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>
Anders Kaseorg committed
Aug 27, 2010 at 13:38 UTC
d8a94803842989582989fd5f5c3062c49134ad5b
1 file changed
+3
-3
gitweb/gitweb.perl
+3
-3
@@ -5191,15 +5191,15 @@ sub git_summary {
5191
}
5192
5193
sub git_tag {
5194
- my $head = git_get_head_hash($project);
5195
- git_header_html();
5196
- git_print_page_nav('','', $head,undef,$head);
5194
my %tag = parse_tag($hash);
5195
5196
if (! %tag) {
5197
die_error(404, "Unknown tag object");
5198
}
5199
5200
+ my $head = git_get_head_hash($project);
5201
+ git_header_html();
5202
+ git_print_page_nav('','', $head,undef,$head);
5203
git_print_header_div('commit', esc_html($tag{'name'}), $hash);
5204
print "<div class=\"title_text\">\n" .
5205
"<table class=\"object_header\">\n" .