summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 56a322f)
raw | patch | inline | side by side (parent: 56a322f)
author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 24 Aug 2006 17:45:30 +0000 (19:45 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 26 Aug 2006 02:40:10 +0000 (19:40 -0700) |
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>
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>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7aa6838836c61a7c965cff42630f98d8407fceac..50e405f6fef49a8c099d44f8f3fce7b1d6f1bbca 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
} 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(
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";
}