From: Mike McCormack <mike@codeweavers.com>
To: git@vger.kernel.org
Subject: [PATCH] Allow adding arbitary lines in the mail header generated by format-patch.
Date: Mon, 06 Mar 2006 22:10:21 +0900 [thread overview]
Message-ID: <440C34BD.9050703@codeweavers.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
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(-)
[-- Attachment #2: cdd5602230adecce4a7dd274b4f81d52681410cb.diff --]
[-- Type: text/x-patch, Size: 1147 bytes --]
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
reply other threads:[~2006-03-06 13:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=440C34BD.9050703@codeweavers.com \
--to=mike@codeweavers.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).