diff mbox series

[bug#50359,2/3] tests: git: Make 'tag' directive non-interactive.

Message ID 29b4b579f8fe8fc3406a48224c5af28d9e70b865.1631290349.git.public@yoctocell.xyz
State Accepted
Headers show
Series Add 'generic-git' updater. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen Sept. 10, 2021, 4:21 p.m. UTC
When running 'git tag TAGNAME', Git will open up the user's default text
editor to make them write a message.  This is not desirable when running
tests.

* guix/tests/git.scm (populate-git-repository): Make the 'tag' directive take
an additional argument, and pass it to the '-m' flag.
---
 guix/tests/git.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès Sept. 13, 2021, 8:03 a.m. UTC | #1
Hello,

Xinglu Chen <public@yoctocell.xyz> skribis:

> When running 'git tag TAGNAME', Git will open up the user's default text
> editor to make them write a message.  This is not desirable when running
> tests.
>
> * guix/tests/git.scm (populate-git-repository): Make the 'tag' directive take
> an additional argument, and pass it to the '-m' flag.

[...]

> -      ((('tag name) rest ...)
> -       (git "tag" name)
> +      ((('tag name text) rest ...)
> +       (git "tag" "-m" text name)

LGTM, but you need to update at least tests/channels.scm accordingly.

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index e11541e83b..e8d4946e87 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -87,8 +87,8 @@  Return DIRECTORY on success."
       ((('commit text ('signer fingerprint)) rest ...)
        (git "commit" "-m" text (string-append "--gpg-sign=" fingerprint))
        (loop rest))
-      ((('tag name) rest ...)
-       (git "tag" name)
+      ((('tag name text) rest ...)
+       (git "tag" "-m" text name)
        (loop rest))
       ((('branch name) rest ...)
        (git "branch" name)