[bug#59523,v2,3/3] doc: contributing: Recommend --base=origin/master.

Message ID 20221126115426.7385-3-paren@disroot.org
State New
Headers
Series [bug#59523,v2,1/3] doc: contributing: Note '-v REVISION' bug in 'git send-email'. |

Commit Message

\( Nov. 26, 2022, 11:54 a.m. UTC
  * 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(-)
  

Comments

Christopher Baines Jan. 11, 2023, 10:58 a.m. UTC | #1
"( via Guix-patches" via <guix-patches@gnu.org> writes:

> * 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
  
\( Jan. 11, 2023, 5:05 p.m. UTC | #2
On Wed Jan 11, 2023 at 10:58 AM GMT, Christopher Baines wrote:
> 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...

    -- (
  

Patch

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