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

  • Done
  • quality assurance status badge
Details
6 participants
  • Kyle Meyer
  • Christopher Baines
  • Maxim Cournoyer
  • Tobias Geerinckx-Rice
  • (
  • zimoun
Owner
unassigned
Submitted by
(
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 2022 20:30
(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 2022 21:47
(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 2022 03:04
(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 on 2 Dec 2022 17:09
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
C
C
Christopher Baines wrote on 11 Jan 2023 11:57
(name . ()(address . paren@disroot.org)
87wn5te3sk.fsf@cbaines.net
"( via Guix-patches" via <guix-patches@gnu.org> writes:

Toggle quote (7 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.
> ---
> doc/contributing.texi | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)

I've pushed this to master now as
09cd488c973c2ea27cfa2224489aca317f596341.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmO+lktfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfM6A/+PtdBFIpZwX44Cf4j5rNehDQYiehAAzdl
iWGGgZioSejTqNtrRam3S+2yYYRzX58v4RaCz5u65oWkBXpd7c+M/EUufk0W+ahS
bZ+6qdtOUJciKPq/K5wLZd1tHlXr8vdNd6myIZcu+Kj1mxzwy6oEf1/WvR5FMPFy
izldjw2AmlwbcvYBCnqHyuuWN4MG/nF6Z0e4RSPVeHp3iz9Vm3rYA8tn3l58IsdL
VwWKXtJEzawI/ZnVK10lZcPDiUPhC0IhNHR+LlW12GjUwhhEPduqlHxk1CstK9hh
smiDmvtcTGqU7xfdJkkCB5Wf5zgreAksxJymOWsPOZ7xmRG30kGNoO1HAVIrUGZL
loD4u4ncvpPwftdahh7xREl6gfHmmuAHeCCZj66L97kJcHAk/x3uc6eBdwHovd8o
LmzZZhjeoaCyqiRBPdoBVRXiuqfC2rv/n87wa4hqs/8La5PBIOaIuD5jkA/KJ9fB
vF78ALJWfttcDrnoROFsI9m9wO+oAXFaLZxSbZ9x6AVP6OwmdcPhMQ0BHxYyOEA2
KpZyazIivEt0zm+oK9Jhy0aF0Rc3AYa8/2+OOtD2AaS2tJba+eP1cHT9jsnlD85U
svzDEb200Po3hzmjlaG9e02kZYxSVmEdPcl+kaRSTxY/4pspDAYS9UDjWm+7rtBg
OOFaxESvPHM=
=+evi
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 11 Jan 2023 11:58
Re: [bug#59523] [PATCH v2 3/3] doc: contributing: Recommend --base=origin/master.
(name . ()(address . paren@disroot.org)
87sfghe3qx.fsf@cbaines.net
"( via Guix-patches" via <guix-patches@gnu.org> writes:

Toggle quote (7 lines)
> * 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(-)

I think this is the last patch associated with this bug that hasn't been
merged.

I did have a look at it, but the commit message is missing the reasoning
for the change, what's the intent behind changing the recommendation?

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmO+loZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe7OhAAofyUEItQz+zG9Ztk6EUJfsNjdgksZDZv
T4eP36/TroLCgdXTkgzwJISLNrhPiXxDno2lfrJDKbmxGiEoPIVAdYxpdNXAVcxB
75X74DefNAfKe1V9oYiocRYmd1u3aHoLRk3POSkgEKJ7BOsvd4vNfxxxNmdiUH76
YH37QWExnJtaOBVYZca6l0rpm/sUETYHirsGkjBqoYP0MCbmYxiCkUOPJkUFnxsr
kJYiFi6rnETmCCObkdeMDJ04gpCagG6Irn/QD6h77ok2EwvN+TrDdFHBjVCmDysa
uXsV+P3vBsI8dpeTXuYKy237tn/l6dVeVPXY/RugVTijJVjZh7X55uRujwRNT+2y
8TPo6J71Sl6noXHfD2JbweSZM0yYssyzfcE5RvFbOIZtaQ0BeNkvUdz1wvmsJaro
oCQpntra7CzwXlmeQvr/POmkrufY0Jub7l1e1bE8fHitDGImVwmYNlWCyFcEXfyQ
ezRVjaHHoQWCtxkVg7YDj4Jl6jqVV3573Mkti/+6nqJ4ZFzaAffUONQ7I4hz6I9g
3eJKx+9fcZpIKD4hAhVelrD6PJDqJzXrBrL6hpH31FhuMOyGTn7tsGtrjPsRx9V2
BkgxTu7VtiHUQGhAum7DJeJ0CwiB5ALZarOVb7V29s1T5x6Z4dUeZ+5jE8ttlflR
obxd0IZi0cE=
=qzcW
-----END PGP SIGNATURE-----

(
(name . Christopher Baines)(address . mail@cbaines.net)
CPPIWR6TVRLO.12KMOFC6PFYE3@guix-framework
On Wed Jan 11, 2023 at 10:58 AM GMT, Christopher Baines wrote:
Toggle quote (3 lines)
> I did have a look at it, but the commit message is missing the reasoning
> for the change, what's the intent behind changing the recommendation?

It's because with --base=auto, you need to git branch --set-upstream=<branch> first.
You might as well just use --base=origin/master instead...

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmO+7HEACgkQ7ImHg/nq
I22twAwA0k+UYrVBhq8F7MJQkGQIpLqqbW3/GebvIk6+Yt/0mEm1PjzfEudId+wM
riMFaLlUvK9ZyXBWVjDR7Qk/I/Z8Y4Rc7q9eLbGc4/ZsN/38cPdSAeXNeW3QUdvq
8vF7Q8tvWu+4VHBpUjcXe6BdCmdKWcbzO5cJTVvMA+KH3OOQP/5MgWcJZIhxTgls
ibNQHwn6+db9mQw22V/7+Hbg96b1MMjT8Ehhxjj/lCkLt0aUZpYpHrM78+fkBuUq
8WWmrEb3Jk7+R8Od6sNEWauFiDR2tyx5nQnVzFws1Z6/2M5p/FSz650USFLHh6jf
edpe5GwrhWKrUp89u5KIejG/Y9E+f4hOtNRgf3VOS3/MGPg2NFgFjJgnfUnzSeXS
BPTjnBwKCejiYlFg5oKQ0LmGA+LPTkHr0SlNvf8Rnpjb07Az55+ZSQmeXK02myug
jpRx5UUadmD5j1/N6NVeZ17fbSt8EeN21NSDjDR2BRO3GSaem8ZBbu5Z+w4HKSuz
bXVkY7lZ
=Uqv6
-----END PGP SIGNATURE-----


K
K
Kyle Meyer wrote on 14 Mar 2023 00:43
Re: [bug#59523] [PATCH] doc: contributing: Note '-v REVISION' bug in 'git send-email'.
(name . ()(address . paren@disroot.org)
87r0tsqksk.fsf@kyleam.com
Kyle Meyer writes:

Toggle quote (4 lines)
> I've just sent a patch:
>
> https://lore.kernel.org/git/20221124020056.242185-1-kyle@kyleam.com

Just to close the loop here: that landed in Git v2.40.0.
M
M
Maxim Cournoyer wrote on 21 Mar 2023 13:34
Re: bug#59523: [PATCH] doc: contributing: Note '-v REVISION' bug in 'git send-email'.
(name . Kyle Meyer)(address . kyle@kyleam.com)
87r0tis2oi.fsf_-_@gmail.com
Hi,

Kyle Meyer <kyle@kyleam.com> writes:

Toggle quote (8 lines)
> Kyle Meyer writes:
>
>> I've just sent a patch:
>>
>> https://lore.kernel.org/git/20221124020056.242185-1-kyle@kyleam.com
>
> Just to close the loop here: that landed in Git v2.40.0.

Awesome. We're now at 2.39, so it seems we can just wait a bit to get
2.40 and then close this issue.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 21 Mar 2023 13:41
(name . Christopher Baines)(address . mail@cbaines.net)
87mt46s2d0.fsf_-_@gmail.com
Hi,

Christopher Baines <mail@cbaines.net> writes:

Toggle quote (12 lines)
> "( via Guix-patches" via <guix-patches@gnu.org> writes:
>
>> * 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(-)
>
> I've pushed this to master now as
> 09cd488c973c2ea27cfa2224489aca317f596341.

OK! Don't forget to revert when git 2.40 lands in master, as it includes
a fix.

--
Thanks,
Maxim
Closed
?