{"thread":{"id":"3583","subject":"[PATCH] Allow adding arbitary lines in the mail header generated by format-patch.","startedAt":"2006-03-06T13:10:21Z","lastAt":"2006-03-06T13:10:21Z","messageCount":1,"participants":["Mike McCormack"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17256","messageId":"440C34BD.9050703@codeweavers.com","threadId":"3583","inReplyTo":null,"subject":"[PATCH] Allow adding arbitary lines in the mail header generated by format-patch.","fromName":"Mike McCormack","fromEmail":"mike@codeweavers.com","sentAt":"2006-03-06T13:10:21Z","receivedAt":"2006-03-06T13:10:21Z","isPatch":true,"sender":{"key":"mike@codeweavers.com","avatar":null},"body":"Entries may be added to the config file as follows:\n\n[format]\n         headers = \"Organization: CodeWeavers\\nTo: wine-patches \n<wine-patches@winehq.org>\\n\"\n\n---\n\n  git-format-patch.sh |    8 ++++++--\n  1 files changed, 6 insertions(+), 2 deletions(-)\n\n\n\ncdd5602230adecce4a7dd274b4f81d52681410cb\ndiff --git a/git-format-patch.sh b/git-format-patch.sh\nindex 2bd2639..bbd2e55 100755\n--- a/git-format-patch.sh\n+++ b/git-format-patch.sh\n@@ -149,6 +149,7 @@ do\n done >$series\n \n me=`git-var GIT_AUTHOR_IDENT | sed -e 's/>.*/>/'`\n+headers=`git-repo-config --get format.headers`\n \n case \"$outdir\" in\n */) ;;\n@@ -173,7 +174,7 @@ titleScript='\n \n process_one () {\n \tperl -w -e '\n-my ($keep_subject, $num, $signoff, $commsg) = @ARGV;\n+my ($keep_subject, $num, $signoff, $headers, $commsg) = @ARGV;\n my ($signoff_pattern, $done_header, $done_subject, $done_separator, $signoff_seen,\n     $last_was_signoff);\n \n@@ -224,6 +225,9 @@ while (<FH>) {\n \t    s/^\\[PATCH[^]]*\\]\\s*//;\n \t    s/^/[PATCH$num] /;\n \t}\n+\tif ($headers) {\n+\t    print \"$headers\\n\";\n+\t}\n         print \"Subject: $_\";\n \t$done_subject = 1;\n \tnext;\n@@ -250,7 +254,7 @@ if (!$signoff_seen && $signoff ne \"\") {\n }\n print \"\\n---\\n\\n\";\n close FH or die \"close $commsg pipe\";\n-' \"$keep_subject\" \"$num\" \"$signoff\" $commsg\n+' \"$keep_subject\" \"$num\" \"$signoff\" \"$headers\" $commsg\n \n \tgit-diff-tree -p $diff_opts \"$commit\" | git-apply --stat --summary\n \techo\n\n"}]}