diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-01-23 10:17:46 +0100 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2026-02-03 07:57:55 +0100 |
| commit | 0871dba4d60a1f59218e52f2bf661412cbfe84c9 (patch) | |
| tree | e06442ed3a141ccc7e32b3baeaa7512d743dfc64 /doc | |
| parent | d499253d47cca2694944c5fd1f4b582e5206890a (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')
| -rw-r--r-- | doc/contributing.texi | 161 |
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 |
| 2157 | can place it under the @file{.git/hooks/commit-msg.d/} directory. | 2156 | can 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 | ||
| 2166 | This section is about contributing code by sending patches by email. | ||
| 2167 | This option is supported until December 31st, 2025, but we recommend | ||
| 2168 | getting familiar with the @dfn{pull request} workflow, which will become | ||
| 2169 | the norm after that date. @xref{Submitting Patches}, for more info. | ||
| 2170 | @end quotation | ||
| 2171 | |||
| 2172 | @unnumberedsubsubsec Single Patches | ||
| 2173 | @anchor{Single Patches} | ||
| 2174 | The @command{git send-email} command is the best way to send both single | ||
| 2175 | patches and patch series (@pxref{Multiple Patches}) to the Guix mailing | ||
| 2176 | list. Sending patches as email attachments may make them difficult to | ||
| 2177 | review in some mail clients, and @command{git diff} does not store commit | ||
| 2178 | metadata. | ||
| 2179 | |||
| 2180 | @quotation Note | ||
| 2181 | The @command{git send-email} command is provided by the @code{send-email} | ||
| 2182 | output of the @code{git} package, i.e. @code{git:send-email}. | ||
| 2183 | @end quotation | ||
| 2184 | |||
| 2185 | The following command will create a patch email from the latest commit, | ||
| 2186 | open it in your @var{EDITOR} or @var{VISUAL} for editing, and send it to | ||
| 2187 | the Guix mailing list to be reviewed and merged. Assuming you have | ||
| 2188 | already configured Git according to @xref{Configuring Git}, you can | ||
| 2189 | simply use: | ||
| 2190 | |||
| 2191 | @example | ||
| 2192 | $ git send-email --annotate -1 | ||
| 2193 | @end example | ||
| 2194 | |||
| 2195 | @quotation Tip | ||
| 2196 | To add a prefix to the subject of your patch, you may use the | ||
| 2197 | @option{--subject-prefix} option. The Guix project uses this to | ||
| 2198 | specify that the patch is intended for a branch or repository | ||
| 2199 | other than the @code{master} branch of | ||
| 2200 | @url{https://codeberg.org/guix/guix.git}. | ||
| 2201 | |||
| 2202 | @example | ||
| 2203 | git send-email --annotate --subject-prefix='PATCH core-updates' -1 | ||
| 2204 | @end example | ||
| 2205 | @end quotation | ||
| 2206 | |||
| 2207 | The patch email contains a three-dash separator line after the commit | ||
| 2208 | message. You may ``annotate'' the patch with explanatory text by adding | ||
| 2209 | it under this line. If you do not wish to annotate the email, you may | ||
| 2210 | drop the @option{--annotate} option. | ||
| 2211 | |||
| 2212 | If you need to send a revised patch, don't resend it like this or send | ||
| 2213 | a ``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} | ||
| 2217 | flag 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 | ||
| 2226 | Due 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 | |||
| 2231 | You can find out @var{ISSUE_NUMBER} either by searching on the mumi | ||
| 2232 | interface at @url{https://issues.guix.gnu.org} for the name of your patch or | ||
| 2233 | reading the acknowledgement email sent automatically by Debbugs in | ||
| 2234 | reply to incoming bugs and patches, which contains the bug number. | ||
| 2235 | |||
| 2236 | @unnumberedsubsubsec Notifying Teams | ||
| 2237 | @anchor{Notifying Teams} | ||
| 2238 | @cindex teams | ||
| 2239 | If your git checkout has been correctly configured (@pxref{Configuring | ||
| 2240 | Git}), the @command{git send-email} command will automatically notify | ||
| 2241 | the appropriate team members, based on the scope of your changes. This | ||
| 2242 | relies on the @file{etc/teams.scm} script, which can also be invoked | ||
| 2243 | manually if you do not use the preferred @command{git send-email} | ||
| 2244 | command to submit patches. To list the available actions of the script, | ||
| 2245 | you can invoke it via the @command{etc/teams.scm help} command. For | ||
| 2246 | more information regarding teams, @pxref{Teams}. | ||
| 2247 | |||
| 2248 | @quotation Note | ||
| 2249 | On foreign distros, you might have to use @command{./pre-inst-env git | ||
| 2250 | send-email} for @file{etc/teams.scm} to work. | ||
| 2251 | @end quotation | ||
| 2252 | |||
| 2253 | @unnumberedsubsubsec Multiple Patches | ||
| 2254 | @anchor{Multiple Patches} | ||
| 2255 | @cindex cover letter | ||
| 2256 | While @command{git send-email} alone will suffice for a single | ||
| 2257 | patch, an unfortunate flaw in Debbugs means you need to be more | ||
| 2258 | careful when sending multiple patches: if you send them all to the | ||
| 2259 | @email{guix-patches@@gnu.org} address, a new issue will be created | ||
| 2260 | for each patch! | ||
| 2261 | |||
| 2262 | When sending a series of patches, it's best to send a Git ``cover | ||
| 2263 | letter'' first, to give reviewers an overview of the patch series. | ||
| 2264 | We can create a directory called @file{outgoing} containing both | ||
| 2265 | our patch series and a cover letter called @file{0000-cover-letter.patch} | ||
| 2266 | with @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. | ||
| 2276 | For example, if you are working in a branch, you could select all commits | ||
| 2277 | in 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 | |||
| 2285 | We can now send @emph{just} the cover letter to the | ||
| 2286 | @email{guix-patches@@gnu.org} address, which will create an issue | ||
| 2287 | that 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 | |||
| 2294 | Ensure you edit the email to add an appropriate subject line and | ||
| 2295 | blurb before sending it. Note the automatically generated shortlog | ||
| 2296 | and diffstat below the blurb. | ||
| 2297 | |||
| 2298 | Once the Debbugs mailer has replied to your cover letter email, you | ||
| 2299 | can 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 | |||
| 2306 | Thankfully, this @command{git format-patch} dance is not necessary | ||
| 2307 | to send an amended patch series, since an issue already exists for | ||
| 2308 | the 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 | |||
| 2315 | If need be, you may use @option{--cover-letter --annotate} to send | ||
| 2316 | another cover letter, e.g. for explaining what's changed since the last | ||
| 2317 | revision, 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 | ||
