aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-08-24 19:45:30 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-25 19:40:10 -0700
commitedf735abfad53a07ae91ca60576386f239bf7482 (patch)
treef386c38b6a167fd5d20aff4b611c71fa176ae8dd /gitweb
parent56a322f16113119bcc3770ef9565297ab59c29d2 (diff)
downloadgit-edf735abfad53a07ae91ca60576386f239bf7482.tar.gz
git-edf735abfad53a07ae91ca60576386f239bf7482.tar.xz
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl10
1 files changed, 3 insertions, 7 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7aa683883..50e405f6f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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";
}