summaryrefslogtreecommitdiff
path: root/doc/contributing.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-01-23 10:17:46 +0100
committerCayetano Santos <csantosb@inventati.org>2026-02-03 07:57:55 +0100
commit0871dba4d60a1f59218e52f2bf661412cbfe84c9 (patch)
treee06442ed3a141ccc7e32b3baeaa7512d743dfc64 /doc/contributing.texi
parentd499253d47cca2694944c5fd1f4b582e5206890a (diff)
doc: Remove “Sending a Patch Series” section.
* doc/contributing.texi (Sending a Patch Series): Remove. Merges guix/guix!5840 Change-Id: I8f15c4385b24cecc6a8f1bd13c2065d2a267e5b1 Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r--doc/contributing.texi161
1 files changed, 0 insertions, 161 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 322ee170356..9cfeba94d9e 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -2129,7 +2129,6 @@ guix pull --url=/path/to/your/checkout --profile=/tmp/guix.master --disable-auth
2129 2129
2130@menu 2130@menu
2131* Configuring Git:: 2131* Configuring Git::
2132* Sending a Patch Series::
2133@end menu 2132@end menu
2134 2133
2135@node Configuring Git 2134@node Configuring Git
@@ -2156,166 +2155,6 @@ changes was already submitted for review. If you have a
2156@file{commit-msg} hook of your own you would like to use with Guix, you 2155@file{commit-msg} hook of your own you would like to use with Guix, you
2157can place it under the @file{.git/hooks/commit-msg.d/} directory. 2156can place it under the @file{.git/hooks/commit-msg.d/} directory.
2158 2157
2159@node Sending a Patch Series
2160@subsection Sending a Patch Series
2161@cindex patch series
2162@cindex @code{git send-email}
2163@cindex @code{git format-patch}
2164
2165@quotation Warning
2166This section is about contributing code by sending patches by email.
2167This option is supported until December 31st, 2025, but we recommend
2168getting familiar with the @dfn{pull request} workflow, which will become
2169the norm after that date. @xref{Submitting Patches}, for more info.
2170@end quotation
2171
2172@unnumberedsubsubsec Single Patches
2173@anchor{Single Patches}
2174The @command{git send-email} command is the best way to send both single
2175patches and patch series (@pxref{Multiple Patches}) to the Guix mailing
2176list. Sending patches as email attachments may make them difficult to
2177review in some mail clients, and @command{git diff} does not store commit
2178metadata.
2179
2180@quotation Note
2181The @command{git send-email} command is provided by the @code{send-email}
2182output of the @code{git} package, i.e. @code{git:send-email}.
2183@end quotation
2184
2185The following command will create a patch email from the latest commit,
2186open it in your @var{EDITOR} or @var{VISUAL} for editing, and send it to
2187the Guix mailing list to be reviewed and merged. Assuming you have
2188already configured Git according to @xref{Configuring Git}, you can
2189simply use:
2190
2191@example
2192$ git send-email --annotate -1
2193@end example
2194
2195@quotation Tip
2196To add a prefix to the subject of your patch, you may use the
2197@option{--subject-prefix} option. The Guix project uses this to
2198specify that the patch is intended for a branch or repository
2199other than the @code{master} branch of
2200@url{https://codeberg.org/guix/guix.git}.
2201
2202@example
2203git send-email --annotate --subject-prefix='PATCH core-updates' -1
2204@end example
2205@end quotation
2206
2207The patch email contains a three-dash separator line after the commit
2208message. You may ``annotate'' the patch with explanatory text by adding
2209it under this line. If you do not wish to annotate the email, you may
2210drop the @option{--annotate} option.
2211
2212If you need to send a revised patch, don't resend it like this or send
2213a ``fix'' patch to be applied on top of the last one; instead, use
2214@command{git commit --amend} or @url{https://git-rebase.io,
2215@command{git rebase}} to modify the commit, and use the
2216@email{@var{ISSUE_NUMBER}@@debbugs.gnu.org} address and the @option{-v}
2217flag with @command{git send-email}.
2218
2219@example
2220$ git commit --amend
2221$ git send-email --annotate -v@var{REVISION} \
2222 --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org -1
2223@end example
2224
2225@quotation Note
2226Due to an apparent bug in @command{git send-email},
2227@option{-v @var{REVISION}} (with the space) will not work; you
2228@emph{must} use @option{-v@var{REVISION}}.
2229@end quotation
2230
2231You can find out @var{ISSUE_NUMBER} either by searching on the mumi
2232interface at @url{https://issues.guix.gnu.org} for the name of your patch or
2233reading the acknowledgement email sent automatically by Debbugs in
2234reply to incoming bugs and patches, which contains the bug number.
2235
2236@unnumberedsubsubsec Notifying Teams
2237@anchor{Notifying Teams}
2238@cindex teams
2239If your git checkout has been correctly configured (@pxref{Configuring
2240Git}), the @command{git send-email} command will automatically notify
2241the appropriate team members, based on the scope of your changes. This
2242relies on the @file{etc/teams.scm} script, which can also be invoked
2243manually if you do not use the preferred @command{git send-email}
2244command to submit patches. To list the available actions of the script,
2245you can invoke it via the @command{etc/teams.scm help} command. For
2246more information regarding teams, @pxref{Teams}.
2247
2248@quotation Note
2249On foreign distros, you might have to use @command{./pre-inst-env git
2250send-email} for @file{etc/teams.scm} to work.
2251@end quotation
2252
2253@unnumberedsubsubsec Multiple Patches
2254@anchor{Multiple Patches}
2255@cindex cover letter
2256While @command{git send-email} alone will suffice for a single
2257patch, an unfortunate flaw in Debbugs means you need to be more
2258careful when sending multiple patches: if you send them all to the
2259@email{guix-patches@@gnu.org} address, a new issue will be created
2260for each patch!
2261
2262When sending a series of patches, it's best to send a Git ``cover
2263letter'' first, to give reviewers an overview of the patch series.
2264We can create a directory called @file{outgoing} containing both
2265our patch series and a cover letter called @file{0000-cover-letter.patch}
2266with @command{git format-patch}.
2267
2268@example
2269$ git format-patch -@var{NUMBER_COMMITS} -o outgoing \
2270 --cover-letter
2271@end example
2272
2273@quotation Note
2274@code{git format-patch} accepts a wide range of
2275@uref{https://git-scm.com/docs/gitrevisions, revision range} specifiers.
2276For example, if you are working in a branch, you could select all commits
2277in your branch starting at @code{master}.
2278
2279@example
2280$ git format-patch master..@var{MY_BRANCH} -o outgoing \
2281 --cover-letter
2282@end example
2283@end quotation
2284
2285We can now send @emph{just} the cover letter to the
2286@email{guix-patches@@gnu.org} address, which will create an issue
2287that we can send the rest of the patches to.
2288
2289@example
2290$ git send-email outgoing/0000-cover-letter.patch --annotate
2291$ rm outgoing/0000-cover-letter.patch # we don't want to resend it!
2292@end example
2293
2294Ensure you edit the email to add an appropriate subject line and
2295blurb before sending it. Note the automatically generated shortlog
2296and diffstat below the blurb.
2297
2298Once the Debbugs mailer has replied to your cover letter email, you
2299can send the actual patches to the newly-created issue address.
2300
2301@example
2302$ git send-email outgoing/*.patch --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org
2303$ rm -rf outgoing # we don't need these anymore
2304@end example
2305
2306Thankfully, this @command{git format-patch} dance is not necessary
2307to send an amended patch series, since an issue already exists for
2308the patchset.
2309
2310@example
2311$ git send-email -@var{NUMBER_COMMITS} -v@var{REVISION} \
2312 --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org
2313@end example
2314
2315If need be, you may use @option{--cover-letter --annotate} to send
2316another cover letter, e.g. for explaining what's changed since the last
2317revision, and why these changes are necessary.
2318
2319@node Tracking Bugs and Changes 2158@node Tracking Bugs and Changes
2320@section Tracking Bugs and Changes 2159@section Tracking Bugs and Changes
2321 2160