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>
This commit is contained in:
Anders Kaseorg 2010-08-27 13:38:16 -04:00 committed by Junio C Hamano
parent eec0daf6fd
commit d8a9480384

View file

@ -5191,15 +5191,15 @@ sub git_summary {
}
sub git_tag {
my $head = git_get_head_hash($project);
git_header_html();
git_print_page_nav('','', $head,undef,$head);
my %tag = parse_tag($hash);
if (! %tag) {
die_error(404, "Unknown tag object");
}
my $head = git_get_head_hash($project);
git_header_html();
git_print_page_nav('','', $head,undef,$head);
git_print_header_div('commit', esc_html($tag{'name'}), $hash);
print "<div class=\"title_text\">\n" .
"<table class=\"object_header\">\n" .