1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 15:16:34 +02:00

git-send-email: fix version string to be valid perl

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>
This commit is contained in:
Martin Langhoff 2006-05-03 09:44:36 +12:00 committed by Junio C Hamano
parent ced9456a27
commit e923effb43

View File

@ -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 $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
@ -299,7 +306,7 @@ sub send_message
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;