unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: "(" <paren@disroot.org>, 58648@debbugs.gnu.org
Subject: [bug#58648] [PATCH v2] doc: contributing: Expand "Sending a Patch Series".
Date: Sat, 22 Oct 2022 13:21:30 +0200	[thread overview]
Message-ID: <9c9a4925aedab67b99f928084ecc7d46fda75f20.camel@gmail.com> (raw)
In-Reply-To: <20221020141349.4780-1-paren@disroot.org>

Am Donnerstag, dem 20.10.2022 um 15:13 +0100 schrieb (:
> * doc/contributing.texi: Expand on sending patches and using
>   git send-email.
> ---
>  doc/contributing.texi | 120 ++++++++++++++++++++++++++++++----------
> --
>  1 file changed, 86 insertions(+), 34 deletions(-)
> 
> diff --git a/doc/contributing.texi b/doc/contributing.texi
> index 4b1eed1cb1..650d3430fb 100644
> --- a/doc/contributing.texi
> +++ b/doc/contributing.texi
> @@ -1149,15 +1149,6 @@ Before submitting a patch that adds or
> modifies a package definition,
>  please run through this check list:
>  
>  @enumerate
> -@cindex @code{git format-patch}
> -@cindex @code{git-format-patch}
> -@item
> -When generating your patches with @code{git format-patch} or
> @code{git
> -send-email}, we recommend using the option @code{--base=}, perhaps
> with
> -the value @code{auto}.  This option adds a note to the patch stating
> -which commit the patch is based on.  This helps reviewers understand
> how
> -to apply and review your patches.
> -
>  @item
>  If the authors of the packaged software provide a cryptographic
>  signature for the release tarball, make an effort to verify the
> @@ -1343,18 +1334,6 @@ a subject, if your patch is to be applied on a
> branch other than
>  @code{master}, say @code{core-updates}, specify it in the subject
> like
>  @samp{[PATCH core-updates] @dots{}}.
>  
> -@quotation Tip
> -To add a prefix to the subject of your patch, you may use the
> -@option{--subject-prefix} option of the @command{git format-patch}
> or
> -@command{git send-email} commands, for example:
> -@example
> -git send-email --subject-prefix='PATCH core-updates' \
> -  --to=guix-patches@@gnu.org -1
> -@end example
> -For more information, run @samp{man git-format-patch} and @samp{man
> -git-send-email}.
> -@end quotation
> -
>  You may use your email client or the @command{git send-email}
> command
>  (@pxref{Sending a Patch Series}).  We prefer to get patches in plain
>  text messages, either inline or as MIME attachments.  You are
> advised to
> @@ -1409,19 +1388,92 @@ git config --local sendemail.thread no
>  @anchor{Sending a Patch Series}
>  @cindex patch series
>  @cindex @code{git send-email}
> +The @command{git send-email} and @command{git format-patch} commands
> allow
> +you to send your commits in email form to a mailing list, to be
> reviewed
> +and applied, and they are the recommended way to submit
> contributions to
> +Guix. When you send the first revision of a patch series, it's best
> to use
> +@command{git format-patch --cover-letter}.
> +
> +@example
> +$ git format-patch -$N -o outgoing --cover-letter --base=HEAD~$N
> +@end example
> +
> +@quotation Note
> +The @command{git send-email} command is provided by the @code{send-
> email}
> +output of the @code{git} package, i.e. @code{git:send-email}.
> +@end quotation
> +
> +This command makes patches out of the last @var{N} commits, and
> writes
> +them to @file{*.patch} files in @file{outgoing/}, along with an
> +automatically generated cover letter.  The @option{--base=HEAD~$N}
> option
> +adds @code{base-commit: @var{COMMIT}} to the bottom of the first
> email.
> +
> +We can now send the cover letter to the Guix mailing list, using
> +@command{git send-email}.
> +
> +@example
> +$ git send-email outgoing/0000-cover-letter.patch -a --to guix-
> patches@@gnu.org
> +@end example
> +
> +Note the @option{-a} flag; this pops up your editor so that you can
> fill
> +in the patchset subject line and blurb with whatever explanatory
> text you
> +feel is appropriate.  Note the automatically generated shortlog and
> +diffstat below the blurb, which help to give potential reviewers an
> +overview of the patchset.
> +
> +@quotation Tip
> +To add a prefix to the subject of your patch, you may use the
> +@option{--subject-prefix} option.
> +
> +@example
> +git format-patch -$N -o outgoing \
> +    --subject-prefix='PATCH core-updates' \
> +    --base=auto --cover-letter
> +@end example
> +@end quotation
> +
> +The use of the @file{etc/teams.scm} script to notify the appropriate
> team
> +members (@pxref{Teams}) is recommended when submitting patches, to
> maximize
> +the chances of your patch series being reviewed quickly.
I think you should also elaborate how this script is to be used.

> +At some point, the Debbugs mailer will reply to your cover letter
> mail
> +with an acknowledgement, which contains the issue number of your
> patchset.
> +You should now send the rest of the patches to this issue thread,
> using
> +the @email{@var{ISSUE_NUMBER}@@debbugs.gnu.org} address.
> +
> +@example
> +$ rm outgoing/0000-cover-letter.patch # Don't resend the cover
> letter!
> +$ git send-email outgoing/*.patch --to ISSUE_NUMBER@@debbugs.gnu.org
> +$ rm -rf outgoing # We're done with the patch files now.
> +@end example
> +
> +After a moment, your patches should appear at
> +@url{https://issues.guix.gnu.org/@var{ISSUE_NUMBER}} and
> +@url{https://debbugs.gnu.org/@var{ISSUE_NUMBER}}.
> +
> +@quotation Note
> +You should @strong{never} send all your patches to
> +@email{guix-patches@@gnu.org} at once, as this will create an issue
> for
> +each individual patch you send!  If you do accidentally do this,
> though,
> +it's not a massive problem, as Debbugs supports merging issues.
> +@end quotation
Perhaps 
  @quotation Caution
  Do @strong{not} send all your patches at once, as this will create an
  issue for each individual patch.  While Debbugs supports merging 
  issues, some interfaces (e.g. Mumi) still treat them as separate
  in certain ways, which can lower or exaggerate visibility and annoy
  reviewers.
  @end quotation

> +To incorporate a reviewer's suggestions, use @command{git rebase -i}
> to
> +amendthe commits, as demonstrated @url{https://git-rebase.io, here},
> and
amend the
> +send a second patch series with a @option{-v2} tag.
> +
> +@example
> +$ git send-email -$N -v2 --base=auto --to
> ISSUE_NUMBER@@debbugs.gnu.org
> +@end example
>  
> -When sending a patch series (e.g., using @code{git send-email}),
> please
> -first send one message to @email{guix-patches@@gnu.org}, and then
> send
> -subsequent patches to @email{@var{NNN}@@debbugs.gnu.org} to make
> sure
> -they are kept together.  See
> -@uref{https://debbugs.gnu.org/Advanced.html, the Debbugs
> documentation}
> -for more information.  You can install @command{git send-email} with
> -@command{guix install git:send-email}.
> -@c Debbugs bug: https://debbugs.gnu.org/db/15/15361.html
> +Note that since we already have an issue on Debbugs for our
> patchset,
> +there's no need for the intermediate @command{git format-patch}
> step. Of
> +course, to send a third patchset, you amy use @option{-v3}, to send
> a
> +fourth, @option{-v4}, and so on.
>  
> -To maximize the chances that you patch series is reviewed, the
> preferred
> -submission way is to use the @code{etc/teams.scm} script to notify
> the
> -appropriate team members (@pxref{Teams}).
> +If need be, you may use @option{--cover-letter -a} to send another
> cover
> +letter, e.g. for explaining what's changed since the last revision,
> and
> +these changes are necessary.
>  
>  @unnumberedsubsec Teams
>  @anchor{Teams}
> @@ -1448,7 +1500,7 @@ You can run the following command to have the
> @code{Mentors} team put in
>  CC of a patch series:
>  
>  @example
> -$ git send-email --to XXX@@debbugs.gnu.org $(./etc/teams.scm cc
> mentors) *.patch
> +$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org
> $(./etc/teams.scm cc mentors) *.patch
>  @end example
>  
>  The appropriate team or teams can also be inferred from the modified
> @@ -1457,7 +1509,7 @@ current Git repository to review, you can run:
>  
>  @example
>  $ guix shell -D guix
> -[env]$ git send-email --to XXX@@debbugs.gnu.org $(./etc/teams.scm
> cc-members HEAD~2 HEAD) *.patch
> +[env]$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org
> $(./etc/teams.scm cc-members HEAD~2 HEAD) *.patch
>  @end example
>  
>  @node Tracking Bugs and Patches
> 
> base-commit: 88746cd80bc56212ae7922c0fa1cd9a18e44c3bb
Also, this series makes it look as though we're only considering multi-
patch series.  Is the simple case of a single patch still covered?  I'd
perhaps organize this along these lines:
- Sending a single patch
- Notifying your senpais via etc/teams
- Sending a multi-patch series
Please don't take these headings too literally ;)

Cheers




  reply	other threads:[~2022-10-22 12:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 21:57 [bug#58648] [PATCH 0/1] doc: contributing: Expand "Sending a Patch Series" ( via Guix-patches via
2022-10-19 22:00 ` [bug#58648] [PATCH 1/1] " ( via Guix-patches via
2022-10-20  8:56   ` zimoun
2022-10-20  8:59     ` ( via Guix-patches via
2022-10-20 14:13 ` [bug#58648] [PATCH v2] " ( via Guix-patches via
2022-10-22 11:21   ` Liliana Marie Prikler [this message]
2022-10-22 11:30     ` ( via Guix-patches via
2022-10-22 12:20       ` Liliana Marie Prikler
2022-10-28 14:41         ` zimoun
2022-10-25 18:42 ` [bug#58648] [PATCH v3] " ( via Guix-patches via
2022-10-25 19:18   ` Liliana Marie Prikler
2022-10-25 19:23     ` ( via Guix-patches via
2022-10-28 14:04     ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c9a4925aedab67b99f928084ecc7d46fda75f20.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=58648@debbugs.gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).