Skip to content

Commit

Permalink
Allow adding arbitary lines in the mail header generated by format-pa…
Browse files Browse the repository at this point in the history
…tch.

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>
  • Loading branch information
Mike McCormack authored and Junio C Hamano committed Mar 7, 2006
1 parent 1242642 commit 00333ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions git-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/) ;;
Expand All @@ -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);
Expand Down Expand Up @@ -224,6 +225,9 @@ while (<FH>) {
s/^\[PATCH[^]]*\]\s*//;
s/^/[PATCH$num] /;
}
if ($headers) {
print "$headers\n";
}
print "Subject: $_";
$done_subject = 1;
next;
Expand All @@ -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
Expand Down

0 comments on commit 00333ca

Please sign in to comment.