Commit 131079fe authored by Ryan Jackson's avatar Ryan Jackson

gitmail: add short sha1 to subject line

Add the short sha1 to the end of the subject line for MUAs that thread by
subject instead of References/In-Reply-To headers.
parent 03fb3921
......@@ -640,6 +640,7 @@ sub commit_mail($\@$@) {
#
my $subject = "git commit: ";
my $ref_type;
my $short_rev;
if (defined($reponame)) {
$subject .= "[$reponame] ";
}
......@@ -665,6 +666,10 @@ sub commit_mail($\@$@) {
my $actionstring = ucfirst($ref_type) . ' ' . short_refname($refname) .
" has been $what_happened";
$short_rev = `git rev-parse --short $refname $STDERRNULL`;
chomp $short_rev;
$subject .= " ($short_rev)" if ($short_rev);
if ($ct eq $CT_REBASE) {
$actionstring .= ". The following commits are new or have been modified:";
} elsif ($ct eq $CT_REWIND) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment