Skip to content

Commit d8a9480

Browse files
anderskgitster
authored andcommitted
gitweb: Don't die_error in git_tag after already printing headers
This fixes an XML error when visiting a nonexistent tag (i.e. "../gitweb.cgi?p=git.git;a=tag;h=refs/tags/BADNAME"). Signed-off-by: Anders Kaseorg <andersk@mit.edu> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent eec0daf commit d8a9480

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5191,15 +5191,15 @@ sub git_summary {
51915191
}
51925192

51935193
sub git_tag {
5194-
my $head = git_get_head_hash($project);
5195-
git_header_html();
5196-
git_print_page_nav('','', $head,undef,$head);
51975194
my %tag = parse_tag($hash);
51985195

51995196
if (! %tag) {
52005197
die_error(404, "Unknown tag object");
52015198
}
52025199

5200+
my $head = git_get_head_hash($project);
5201+
git_header_html();
5202+
git_print_page_nav('','', $head,undef,$head);
52035203
git_print_header_div('commit', esc_html($tag{'name'}), $hash);
52045204
print "<div class=\"title_text\">\n" .
52055205
"<table class=\"object_header\">\n" .

0 commit comments

Comments
 (0)