mirror of
https://github.com/git/git.git
synced 2024-11-12 12:00:14 +01:00
gitweb: Use git_get_name_rev_tags for commitdiff_plain X-Git-Tag: header
Use git_get_rev_name_tags function for X-Git-Tag: header in git_commitdiff('plain'), i.e. for commitdiff_plain action. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
56a322f161
commit
edf735abfa
@ -2840,10 +2840,7 @@ sub git_commitdiff {
|
||||
|
||||
} elsif ($format eq 'plain') {
|
||||
my $refs = git_get_references("tags");
|
||||
my @tagnames;
|
||||
if (exists $refs->{$hash}) {
|
||||
@tagnames = map { s|^tags/|| } $refs->{$hash};
|
||||
}
|
||||
my $tagname = git_get_rev_name_tags($hash);
|
||||
my $filename = basename($project) . "-$hash.patch";
|
||||
|
||||
print $cgi->header(
|
||||
@ -2857,10 +2854,9 @@ From: $co{'author'}
|
||||
Date: $ad{'rfc2822'} ($ad{'tz_local'})
|
||||
Subject: $co{'title'}
|
||||
TEXT
|
||||
foreach my $tag (@tagnames) {
|
||||
print "X-Git-Tag: $tag\n";
|
||||
}
|
||||
print "X-Git-Tag: $tagname\n" if $tagname;
|
||||
print "X-Git-Url: " . $cgi->self_url() . "\n\n";
|
||||
|
||||
foreach my $line (@{$co{'comment'}}) {
|
||||
print "$line\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user