git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/5] MyFirstContribution: add "Anatomy of a Patch Series" section

From
Philippe Blain via GitGitGadget <gitgitgadget@gmail.com>
Date
May 11, 2022, 01:47 UTC
Message-ID
<59af7e5e5ad84103b39ac9511791eb06b88df3c6.1652233654.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1226.v2.git.1652233654.gitgitgadget@gmail.com>
From: Philippe Blain <levraiphilippeblain@gmail.com>

Before describing how to send patches to the mailing list either with GitGitGadget or 'git send-email', the MyFirstContribution tutorial includes a small "Getting Ready to Share" section where the two different methods are briefly introduced.

Use this section to also describe what a patch series looks like once submitted, so that readers get an understanding of the end result before diving into how to accomplish that end result.

Start by copying the "thread overview" section of a recent contribution from the public-inbox web UI and explaining how each commit is a separate mail, and point out the cover letter.

Subsequent commits will move the existing description of the purpose of the cover letter from the 'git send-email' section to this "anatomy" section.

Also, change the wording in the introductory paragraph to use "contributions" instead of "patches", since this makes more sense when talking about GitHub pull requests.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 Documentation/MyFirstContribution.txt | 54 +++++++++++++++++++++++++--
 1 file changed, 51 insertions(+), 3 deletions(-)
diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 63a2ef54493..22848f84bec 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -710,13 +710,61 @@ dependencies. `prove` also makes the output nicer.
 Go ahead and commit this change, as well.
 
 [[ready-to-share]]
-== Getting Ready to Share
+== Getting Ready to Share: Anatomy of a Patch Series
 
 You may have noticed already that the Git project performs its code reviews via
 emailed patches, which are then applied by the maintainer when they are ready
-and approved by the community. The Git project does not accept patches from
+and approved by the community. The Git project does not accept contributions from
 pull requests, and the patches emailed for review need to be formatted a
-specific way. At this point the tutorial diverges, in order to demonstrate two
+specific way.
+
+:patch-series: https://lore.kernel.org/git/pull.1218.git.git.1645209647.gitgitgadget@gmail.com/
+:lore: https://lore.kernel.org/git/
+
+Before taking a look at how to convert your commits into emailed patches,
+let's analyze what the end result, a "patch series", looks like. Here is an
+{patch-series}[example] of the summary view for a patch series on the web interface of
+the {lore}[Git mailing list archive]:
+
+----
+2022-02-18 18:40 [PATCH 0/3] libify reflog John Cai via GitGitGadget
+2022-02-18 18:40 ` [PATCH 1/3] reflog: libify delete reflog function and helpers John Cai via GitGitGadget
+2022-02-18 19:10   ` Ævar Arnfjörð Bjarmason [this message]
+2022-02-18 19:39     ` Taylor Blau
+2022-02-18 19:48       ` Ævar Arnfjörð Bjarmason
+2022-02-18 19:35   ` Taylor Blau
+2022-02-21  1:43     ` John Cai
+2022-02-21  1:50       ` Taylor Blau
+2022-02-23 19:50         ` John Cai
+2022-02-18 20:00   ` // other replies ellided
+2022-02-18 18:40 ` [PATCH 2/3] reflog: call reflog_delete from reflog.c John Cai via GitGitGadget
+2022-02-18 19:15   ` Ævar Arnfjörð Bjarmason
+2022-02-18 20:26     ` Junio C Hamano
+2022-02-18 18:40 ` [PATCH 3/3] stash: call reflog_delete from reflog.c John Cai via GitGitGadget
+2022-02-18 19:20   ` Ævar Arnfjörð Bjarmason
+2022-02-19  0:21     ` Taylor Blau
+2022-02-22  2:36     ` John Cai
+2022-02-22 10:51       ` Ævar Arnfjörð Bjarmason
+2022-02-18 19:29 ` [PATCH 0/3] libify reflog Ævar Arnfjörð Bjarmason
+2022-02-22 18:30 ` [PATCH v2 0/3] libify reflog John Cai via GitGitGadget
+2022-02-22 18:30   ` [PATCH v2 1/3] stash: add test to ensure reflog --rewrite --updatref behavior John Cai via GitGitGadget
+2022-02-23  8:54     ` Ævar Arnfjörð Bjarmason
+2022-02-23 21:27       ` Junio C Hamano
+// continued
+----
+
+We can note a few things:
+
+- Each commit is sent as a separate email, with the commit message title as
+  subject, prefixed with "[PATCH _i_/_n_]" for the _i_-th commit of an
+  _n_-commit series.
+- Each patch is sent as a reply to an introductory email called the _cover
+  letter_ of the series, prefixed "[PATCH 0/_n_]".
+- Subsequent iterations of the patch series are labelled "[PATCH v2]", "[PATCH
+  v3]", etc. and sent with a new cover letter, itself a reply to the cover
+  letter of the previous iteration (more on that below).
+
+At this point the tutorial diverges, in order to demonstrate two
 different methods of formatting your patchset and getting it reviewed.
 
 The first method to be covered is GitGitGadget, which is useful for those
-- 
gitgitgadget
Previous: Philippe Blain via GitGitGadgetNext: Bagas Sanjaya
Message 17 of 43 in “Improve MyFirstContribution's GitGitGadget section”
  1. 0/3 Improve MyFirstContribution's GitGitGadget sectionPhilippe Blain via GitGitGadget, Apr 27, 2022
  2. 3/3 MyFirstContribution: drop PR description for GGG single-patch contributionsPhilippe Blain via GitGitGadget, Apr 27, 2022
  3. Junio C HamanoApr 27, 2022
  4. Philippe BlainApr 28, 2022
  5. Junio C HamanoApr 28, 2022
  6. 2/3 MyFirstContribution: also explain cover letter in GitGitGadget sectionPhilippe Blain via GitGitGadget, Apr 27, 2022
  7. Victoria DyeApr 27, 2022
  8. Philippe BlainApr 28, 2022
  9. Victoria DyeApr 29, 2022
  10. Philippe BlainMay 10, 2022
  11. 1/3 MyFirstContribution: move cover letter description to a separate filePhilippe Blain via GitGitGadget, Apr 27, 2022
  12. Eric SunshineApr 27, 2022
  13. Philippe BlainApr 27, 2022
  14. Junio C HamanoApr 27, 2022
  15. Philippe BlainApr 28, 2022
  16. 0/5 Improve MyFirstContribution's GitGitGadget sectionPhilippe Blain via GitGitGadget, May 11, 2022
  17. 1/5 MyFirstContribution: add "Anatomy of a Patch Series" sectionPhilippe Blain via GitGitGadget, May 11, 2022
  18. Bagas SanjayaMay 11, 2022
  19. Junio C HamanoMay 11, 2022
  20. Philippe BlainMay 11, 2022
  21. Junio C HamanoMay 11, 2022
  22. Philippe BlainMay 12, 2022
  23. Philip OakleyMay 12, 2022
  24. Philippe BlainMay 12, 2022
  25. 2/5 MyFirstContribution: add standalone section on cover letterPhilippe Blain via GitGitGadget, May 11, 2022
  26. Junio C HamanoMay 11, 2022
  27. Philippe BlainMay 11, 2022
  28. 3/5 MyFirstContribution: reference "The cover letter" in "Preparing Email"Philippe Blain via GitGitGadget, May 11, 2022
  29. 5/5 MyFirstContribution: drop PR description for GGG single-patch contributionsPhilippe Blain via GitGitGadget, May 11, 2022
  30. 4/5 MyFirstContribution: reference "The cover letter" in GitGitGadget sectionPhilippe Blain via GitGitGadget, May 11, 2022
  31. Junio C HamanoMay 11, 2022
  32. Victoria DyeMay 11, 2022
  33. 0/5 Improve MyFirstContribution's GitGitGadget sectionPhilippe Blain via GitGitGadget, May 12, 2022
  34. 3/5 MyFirstContribution: reference "The cover letter" in "Preparing Email"Philippe Blain via GitGitGadget, May 12, 2022
  35. 1/5 MyFirstContribution: add "Anatomy of a Patch Series" sectionPhilippe Blain via GitGitGadget, May 12, 2022
  36. 5/5 MyFirstContribution: drop PR description for GGG single-patch contributionsPhilippe Blain via GitGitGadget, May 12, 2022
  37. 4/5 MyFirstContribution: reference "The cover letter" in GitGitGadget sectionPhilippe Blain via GitGitGadget, May 12, 2022
  38. 2/5 MyFirstContribution: add standalone section on cover letterPhilippe Blain via GitGitGadget, May 12, 2022
  39. Junio C HamanoMay 19, 2022
  40. Philippe BlainMay 21, 2022
  41. Junio C HamanoMay 22, 2022
  42. Philippe BlainMay 24, 2022
  43. Junio C HamanoMay 24, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.