[PATCH] doc: contributing: Note '-v REVISION' bug in 'git send-email'.

OpenSubmitted by (.
Details
4 participants
  • Kyle Meyer
  • Tobias Geerinckx-Rice
  • (
  • zimoun
Owner
unassigned
Severity
normal
(
(address . guix-patches@gnu.org)(name . ()(address . paren@disroot.org)
20221123190710.26517-1-paren@disroot.org
* doc/contributing.texi ("Submitting Patches")["Sending a Patch Series"]:
Note that a bug in 'git send-email' means '-v REVISION' (with a
space) will not work.
---
Heya Guix,

Turns out that due to a bug in ``git send-email'', using ``-v 2'' with
a space between the flag and the argument won't work. If you try it, it'll
print a confusing error message, so this patch updates the manual to note
this and remove the space in an example that uses it.

-- (

doc/contributing.texi | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 40ae33ecac..913c7cf436 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1462,10 +1462,16 @@ address and the @option{-v} flag with @command{git send-email}.
 
 @example
 $ git commit -a
-$ git send-email -1 -a --base=auto -v @var{REVISION} \
+$ git send-email -1 -a --base=auto -v@var{REVISION} \
       --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org
 @end example
 
+@quotation Note
+Due to an apparent bug in @command{git send-email},
+@option{-v @var{REVISION}} (with the space) will not work; you
+@emph{must} use @option{-v@var{REVISION}}.
+@end quotation
+
 You can find out @var{ISSUE_NUMBER} either by searching on the mumi
 interface at @url{issues.guix.gnu.org} for the name of your patch or
 reading the acknowledgement email sent automatically by Debbugs in

base-commit: d33ed58169edc027cfb6c256ecabde87e59918ed
-- 
2.38.1
T
T
Tobias Geerinckx-Rice wrote on 23 Nov 20:30 +0100
(name . ()(address . paren@disroot.org)
87y1s1bh9o.fsf@nckx
"( via Guix-patches" via 写道:
Toggle quote (3 lines)
> Turns out that due to a bug in ``git send-email'', using ``-v
> 2''

Has this been reported upstream?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCY3500w0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15RTwBALfEyO+gYh73V8N8ebokoTwg0Es5QMUxnvY1OGZ8
ypRfAQD9Ew1Ja1bxaeGnqBocaWUhCJ0fveCtqX8CindCte2JBw==
=06pT
-----END PGP SIGNATURE-----

Z
Z
zimoun wrote on 23 Nov 21:47 +0100
(name . ()(address . paren@disroot.org)
86k03lfle1.fsf@gmail.com
Hi,

On Wed, 23 Nov 2022 at 19:07, "\( via Guix-patches" via <guix-patches@gnu.org> wrote:

Toggle quote (5 lines)
> Turns out that due to a bug in ``git send-email'', using ``-v 2'' with
> a space between the flag and the argument won't work. If you try it, it'll
> print a confusing error message, so this patch updates the manual to note
> this and remove the space in an example that uses it.

Arf clunky Git CLI. :-) The git-format-patch manual says:

-v <n>, --reroll-count=<n>

so the space is allowed and it seems to work. The git-send-email
manual says,

git send-email [<options>] <format-patch options>

and indeed,

Toggle snippet (7 lines)
$ git send-email -1 -v 2 --to=trash@trash.com
fatal: ambiguous argument '2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
format-patch -o /tmp/bin67IOTaX -1 2: command returned error: 128

But it works without the space. Arf, Git CLI…


Cheers,
simon
(
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
COK150MK63DE.2954QEYNLT44@guix-framework
On Wed Nov 23, 2022 at 7:30 PM GMT, Tobias Geerinckx-Rice wrote:
Toggle quote (2 lines)
> Has this been reported upstream?

Not afaik. The person who originally noticed this said they had
considered reporting it but it looked like a pain to report. I'll
have a look myself in a moment.

-- (
K
K
Kyle Meyer wrote on 24 Nov 03:04 +0100
(address . 59523@debbugs.gnu.org)
87o7sx5cqp.fsf@kyleam.com
"\( via Guix-patches" via writes:

Toggle quote (7 lines)
> On Wed Nov 23, 2022 at 7:30 PM GMT, Tobias Geerinckx-Rice wrote:
>> Has this been reported upstream?
>
> Not afaik. The person who originally noticed this said they had
> considered reporting it but it looked like a pain to report. I'll
> have a look myself in a moment.

(
[PATCH v2 2/3] doc: contributing: Fix incorrect guix-patches address.
(address . 59523@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221126115426.7385-2-paren@disroot.org
* doc/contributing.texi ("Submitting Patches")
["Sending a Patch Series"]<"Multiple Patches">: Correct
'guix-patches@debbugs.gnu.org' to 'guix-patches@gnu.org'.
---
doc/contributing.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 913c7cf436..d2c1d69f69 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1515,7 +1515,7 @@ that we can send the rest of the patches to.
 
 @example
 $ git send-email outgoing/0000-cover-letter.patch -a \
-      --to=guix-patches@@debbugs.gnu.org \
+      --to=guix-patches@@gnu.org \
       $(etc/teams.scm cc-members ...)
 $ rm outgoing/0000-cover-letter.patch # we don't want to resend it!
 @end example
-- 
2.38.1
(
[PATCH v2 1/3] doc: contributing: Note '-v REVISION' bug in 'git send-email'.
(address . 59523@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221126115426.7385-1-paren@disroot.org
* doc/contributing.texi ("Submitting Patches")["Sending a Patch Series"]:
Note that a bug in 'git send-email' means '-v REVISION' (with a
space) will not work.
---
doc/contributing.texi | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 40ae33ecac..913c7cf436 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1462,10 +1462,16 @@ address and the @option{-v} flag with @command{git send-email}.
 
 @example
 $ git commit -a
-$ git send-email -1 -a --base=auto -v @var{REVISION} \
+$ git send-email -1 -a --base=auto -v@var{REVISION} \
       --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org
 @end example
 
+@quotation Note
+Due to an apparent bug in @command{git send-email},
+@option{-v @var{REVISION}} (with the space) will not work; you
+@emph{must} use @option{-v@var{REVISION}}.
+@end quotation
+
 You can find out @var{ISSUE_NUMBER} either by searching on the mumi
 interface at @url{issues.guix.gnu.org} for the name of your patch or
 reading the acknowledgement email sent automatically by Debbugs in

base-commit: d33ed58169edc027cfb6c256ecabde87e59918ed
-- 
2.38.1
(
[PATCH v2 3/3] doc: contributing: Recommend --base=origin/master.
(address . 59523@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221126115426.7385-3-paren@disroot.org
* doc/contributing.texi ("Submitting Patches")
["Sending a Patch Series"]: Recommend --base=origin/master instead
of --base=auto.
---
doc/contributing.texi | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

Toggle diff (67 lines)
diff --git a/doc/contributing.texi b/doc/contributing.texi
index d2c1d69f69..edbdf2fded 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1428,7 +1428,8 @@ open it in your @var{EDITOR} or @var{VISUAL} for editing, and send it to
 the Guix mailing list to be reviewed and merged:
 
 @example
-$ git send-email -1 -a --base=auto --to=guix-patches@@gnu.org
+$ git send-email -1 -a --base=origin/master \
+      --to=guix-patches@@gnu.org
 @end example
 
 @quotation Tip
@@ -1439,7 +1440,7 @@ other than the @code{master} branch of
 @url{https://git.savannah.gnu.org/cgit/guix.git}.
 
 @example
-git send-email -1 -a --base=auto \
+git send-email -1 -a --base=origin/master \
     --subject-prefix='PATCH core-updates' \
     --to=guix-patches@@gnu.org
 @end example
@@ -1450,9 +1451,11 @@ message.  You may ``annotate'' the patch with explanatory text by adding
 it under this line.  If you do not wish to annotate the email, you may
 drop the @option{-a} flag (which is short for @option{--annotate}).
 
-The @option{--base=auto} flag automatically adds a note at the bottom
-of the patch of the commit it was based on, making it easier for
-maintainers to rebase and merge your patch.
+The @option{--base=origin/master} flag automatically adds a note at the
+bottom of the patch of the commit hash of @code{origin/master}, making it
+easier for maintainers to rebase and merge your patch.  Of course, if
+your patchset is based on, say, @code{core-updates}, you need to use
+@option{--base=origin/core-updates}.
 
 If you need to send a revised patch, don't resend it like this or send
 a ``fix'' patch to be applied on top of the last one; instead, use
@@ -1462,7 +1465,7 @@ address and the @option{-v} flag with @command{git send-email}.
 
 @example
 $ git commit -a
-$ git send-email -1 -a --base=auto -v@var{REVISION} \
+$ git send-email -1 -a --base=origin/master -v@var{REVISION} \
       --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org
 @end example
 
@@ -1506,7 +1509,7 @@ with @command{git format-patch}.
 
 @example
 $ git format-patch -@var{NUMBER_COMMITS} -o outgoing \
-      --cover-letter --base=auto
+      --cover-letter --base=origin/master
 @end example
 
 We can now send @emph{just} the cover letter to the
@@ -1540,7 +1543,7 @@ the patchset.
 
 @example
 $ git send-email -@var{NUMBER_COMMITS} \
-      -v@var{REVISION} --base=auto \
+      -v@var{REVISION} --base=origin/master \
       --to @var{ISSUE_NUMBER}@@debbugs.gnu.org
 @end example
 
-- 
2.38.1
Z
Z
zimoun wrote 4 days ago
Re: [bug#59523] [PATCH v2 1/3] doc: contributing: Note '-v REVISION' bug in 'git send-email'.
(name . ()(address . paren@disroot.org)
87h6ydrdnb.fsf@gmail.com
Hi,

On Sat, 26 Nov 2022 at 11:54, "\( via Guix-patches" via <guix-patches@gnu.org> wrote:
Toggle quote (4 lines)
> * doc/contributing.texi ("Submitting Patches")["Sending a Patch Series"]:
> Note that a bug in 'git send-email' means '-v REVISION' (with a
> space) will not work.

This patch and all the 2 others LGTM.

Cheers,
simon
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 59523@debbugs.gnu.org