Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-send-email: fix version string to be valid perl
author
Martin Langhoff
<martin@catalyst.net.nz>
Tue, 2 May 2006 21:44:36 +0000
(09:44 +1200)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 2 May 2006 21:59:58 +0000
(14:59 -0700)
This makes git-send-email easier to develop and debug, skipping the need
to `make git-send-email` every time.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ced9456
)
diff --git
a/git-send-email.perl
b/git-send-email.perl
index ecfa347b85bb6c3c5e6b1b3a1f83ac1acb069b66..703dd1ff9ee641b58ad592cfc702de7f96c59eed 100755
(executable)
--- a/
git-send-email.perl
+++ b/
git-send-email.perl
@@
-291,6
+291,13
@@
sub send_message
my $to = join (",\n\t", @recipients);
@recipients = unique_email_list(@recipients,@cc);
my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++));
my $to = join (",\n\t", @recipients);
@recipients = unique_email_list(@recipients,@cc);
my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++));
+ my $gitversion = '@@GIT_VERSION@@';
+ if ($gitversion =~ m/..GIT_VERSION../) {
+ $gitversion = `git --version`;
+ chomp $gitversion;
+ # keep only what's after the last space
+ $gitversion =~ s/^.* //;
+ }
my $header = "From: $from
To: $to
my $header = "From: $from
To: $to
@@
-299,7
+306,7
@@
sub send_message
Reply-To: $from
Date: $date
Message-Id: $message_id
Reply-To: $from
Date: $date
Message-Id: $message_id
-X-Mailer: git-send-email
@@GIT_VERSION@@
+X-Mailer: git-send-email
$gitversion
";
$header .= "In-Reply-To: $reply_to\n" if $reply_to;
";
$header .= "In-Reply-To: $reply_to\n" if $reply_to;