summaryrefslogtreecommitdiff
path: root/git-format-patch.sh
diff options
context:
space:
mode:
authorMike McCormack <mike@codeweavers.com>2006-03-06 13:10:21 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-03-07 01:04:07 (GMT)
commit00333ca35c5986e44d4cd4fd59433200d916f77e (patch)
tree77de22029419e69f0a0249350a45c728c80d114c /git-format-patch.sh
parent1242642c468a7bcc335a676273eae4ced8a55f04 (diff)
downloadgit-00333ca35c5986e44d4cd4fd59433200d916f77e.zip
git-00333ca35c5986e44d4cd4fd59433200d916f77e.tar.gz
git-00333ca35c5986e44d4cd4fd59433200d916f77e.tar.bz2
Allow adding arbitary lines in the mail header generated by format-patch.
Entries may be added to the config file as follows: [format] headers = "Organization: CodeWeavers\nTo: wine-patches <wine-patches@winehq.org>\n" Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-format-patch.sh')
-rwxr-xr-xgit-format-patch.sh8
1 files changed, 6 insertions, 2 deletions
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