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

[PATCH v2 4/4] Documentation for format.coverletter and --cover-letter

From
FTFrank Terbeck <ft@bewatermyfriend.org>
Date
May 4, 2009, 09:59 UTC
Message-ID
<1241431142-8444-5-git-send-email-ft@bewatermyfriend.org>
In-Reply-To
<7v8wlxx18c.fsf@gitster.siamese.dyndns.org>
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
---
 Documentation/config.txt           |    9 +++++++++
 Documentation/git-format-patch.txt |   17 ++++++++++++++---
 2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 5dcad94..2842cb1 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -723,6 +723,15 @@ format.attach::
 	value as the boundary.  See the --attach option in
 	linkgit:git-format-patch[1].
 
+format.coverauto::
+	A boolean variable, if set linkgit:git-format-patch[1] will behave
+	as if it was called with its --cover-letter option, unless it was
+	run with its --stdout option.
+
+format.coverletter::
+	Configures how long a patch series needs to be for cover letters
+	to be created. The default is 2.
+
 format.numbered::
 	A boolean which can enable or disable sequence numbers in patch
 	subjects.  It defaults to "auto" which enables it only if there
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 6f1fc80..64f90a1 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -19,7 +19,7 @@ SYNOPSIS
 		   [--ignore-if-in-upstream]
 		   [--subject-prefix=Subject-Prefix]
 		   [--cc=<email>]
-		   [--cover-letter]
+		   [--cover-letter[=(always|never|<length>)]]
 		   [<common diff options>]
 		   [ <since> | <revision range> ]
 
@@ -107,7 +107,11 @@ include::diff-options.txt[]
 
 --stdout::
 	Print all commits to the standard output in mbox format,
-	instead of creating a file for each one.
+	instead of creating a file for each one. This also disables
+	the format.coverauto option if it was set. If you really want
+	cover letters to be included in --stdout output you have to
+	specify the --cover-letter option after the --stdout option
+	on the command line.
 
 --attach[=<boundary>]::
 	Create multipart/mixed attachment, the first part of
@@ -163,10 +167,17 @@ if that is not set.
 	to any configured headers, and may be used multiple times.
 	For example, --add-header="Organization: git-foo"
 
---cover-letter::
+--cover-letter[=(always|never|<length>)]::
 	In addition to the patches, generate a cover letter file
 	containing the shortlog and the overall diffstat.  You can
 	fill in a description in the file before sending it out.
+	Per default, cover letters are created if a patch series is least two
+	patches long (the format.coverletter allows you to change that default
+	length). If a parameter is given it overwrites the default minimum
+	series length. If the parameter is 0 or 'never', a cover letter will
+	not be generated even if the format.coverletter option would trigger
+	normally it. If the parameter is 1 or 'always' a cover letter will
+	be generated even if the patch series is only one patch long.
 
 --suffix=.<sfx>::
 	Instead of using `.patch` as the suffix for generated
-- 
1.6.2.2.446.gfbdc0
Previous: Frank TerbeckNext: Jeff King
Message 20 of 21 in “more automation for cover letter generation”
  1. 0/6 more automation for cover letter generationFrank Terbeck, Apr 18, 2009
  2. 1/6 format-patch: add cover{letter,onepatch} optionsFrank Terbeck, Apr 18, 2009
  3. 2/6 Add documentation for format-patch's --cover-one-patchFrank Terbeck, Apr 18, 2009
  4. 3/6 Document format.coverletter and format.coveronepatchFrank Terbeck, Apr 18, 2009
  5. 4/6 format-patch: introduce overwritecoverletter optionFrank Terbeck, Apr 18, 2009
  6. 5/6 Add documentation for --cover-overwriteFrank Terbeck, Apr 18, 2009
  7. 6/6 Document format.overwritecoverletterFrank Terbeck, Apr 18, 2009
  8. Junio C HamanoApr 18, 2009
  9. 0/4 more automation for cover letter generationFrank Terbeck, May 4, 2009
  10. 1/4 Add format.coverletter optionFrank Terbeck, May 4, 2009
  11. 2/4 Add format.coverauto booleanFrank Terbeck, May 4, 2009
  12. Stephen BoydMay 4, 2009
  13. Frank TerbeckMay 4, 2009
  14. Junio C HamanoMay 4, 2009
  15. Frank TerbeckMay 5, 2009
  16. Junio C HamanoMay 5, 2009
  17. Frank TerbeckMay 5, 2009
  18. Frank TerbeckMay 5, 2009
  19. 3/4 Add tests for coverauto, coverletter and --cover-letterFrank Terbeck, May 4, 2009
  20. 4/4 Documentation for format.coverletter and --cover-letterFrank Terbeck, May 4, 2009
  21. Jeff KingApr 21, 2009

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.