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

[PATCH] Allow adding arbitary lines in the mail header generated by format-patch.

From
MMMike McCormack <mike@codeweavers.com>
Date
Mar 6, 2006, 13:10 UTC
Message-ID
<440C34BD.9050703@codeweavers.com>
Entries may be added to the config file as follows:
[format]
         headers = "Organization: CodeWeavers\nTo: wine-patches 
<wine-patches@winehq.org>\n"
---
  git-format-patch.sh |    8 ++++++--
  1 files changed, 6 insertions(+), 2 deletions(-)
cdd5602230adecce4a7dd274b4f81d52681410cb
diff --git a/git-format-patch.sh b/git-format-patch.sh
index 2bd2639..bbd2e55 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -149,6 +149,7 @@ do
 done >$series
 
 me=`git-var GIT_AUTHOR_IDENT | sed -e 's/>.*/>/'`
+headers=`git-repo-config --get format.headers`
 
 case "$outdir" in
 */) ;;
@@ -173,7 +174,7 @@ titleScript='
 
 process_one () {
 	perl -w -e '
-my ($keep_subject, $num, $signoff, $commsg) = @ARGV;
+my ($keep_subject, $num, $signoff, $headers, $commsg) = @ARGV;
 my ($signoff_pattern, $done_header, $done_subject, $done_separator, $signoff_seen,
     $last_was_signoff);
 
@@ -224,6 +225,9 @@ while (<FH>) {
 	    s/^\[PATCH[^]]*\]\s*//;
 	    s/^/[PATCH$num] /;
 	}
+	if ($headers) {
+	    print "$headers\n";
+	}
         print "Subject: $_";
 	$done_subject = 1;
 	next;
@@ -250,7 +254,7 @@ if (!$signoff_seen && $signoff ne "") {
 }
 print "\n---\n\n";
 close FH or die "close $commsg pipe";
-' "$keep_subject" "$num" "$signoff" $commsg
+' "$keep_subject" "$num" "$signoff" "$headers" $commsg
 
 	git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary
 	echo
Message 1 of 1 in “Allow adding arbitary lines in the mail header generated by format-patch.”
  1. Allow adding arbitary lines in the mail header generated by format-patch.Mike McCormack, Mar 6, 2006

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.