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

[PATCH 4/4] Document negated forms of format-patch --to --cc --add-headers

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 29, 2011, 20:10 UTC
Message-ID
<b18a36a42a45dd4147c43d959c64e00b9b17e4ac.1314648438.git.trast@student.ethz.ch>
In-Reply-To
<bbfb7190ca0125798417f57f4d33b5443257e478.1314648438.git.trast@student.ethz.ch>

The negated forms introduced in c426003 (format-patch: add --no-cc, --no-to, and --no-add-headers, 2010-03-07) were not documented anywhere. Add them to the descriptions of the positive forms.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

I can't help but notice that the options aren't symmetric: --no-add-header clears more than just the options added by --add-header. It's probably too late to change though.

 Documentation/git-format-patch.txt |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index d13c9b2..6ea9be7 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -166,15 +166,22 @@ will want to ensure that threading is disabled for `git send-email`.
 --to=<email>::
 	Add a `To:` header to the email headers. This is in addition
 	to any configured headers, and may be used multiple times.
+	The negated form `--no-to` discards all `To:` headers added so
+	far (from config or command line).
 
 --cc=<email>::
 	Add a `Cc:` header to the email headers. This is in addition
 	to any configured headers, and may be used multiple times.
+	The negated form `--no-cc` discards all `Cc:` headers added so
+	far (from config or command line).
 
 --add-header=<header>::
 	Add an arbitrary header to the email headers.  This is in addition
 	to any configured headers, and may be used multiple times.
-	For example, `--add-header="Organization: git-foo"`
+	For example, `--add-header="Organization: git-foo"`.
+	The negated form `--no-add-header` discards *all* (`To:`,
+	`Cc:`, and custom) headers added so far from config or command
+	line.
 
 --cover-letter::
 	In addition to the patches, generate a cover letter file
-- 
1.7.7.rc0.370.gdcae57
Previous: Thomas RastNext: Junio C Hamano
Message 4 of 5 in “t4014: check for empty files from git format-patch --stdout”
  1. 1/4 t4014: check for empty files from git format-patch --stdoutThomas Rast, Aug 29, 2011
  2. 2/4 t4014: invoke format-patch with --stdout where intendedThomas Rast, Aug 29, 2011
  3. 3/4 t4014: "no-add-headers" is actually called "no-add-header"Thomas Rast, Aug 29, 2011
  4. 4/4 Document negated forms of format-patch --to --cc --add-headersThomas Rast, Aug 29, 2011
  5. Junio C HamanoAug 29, 2011

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.