From: Anders Kaseorg Date: Fri, 27 Aug 2010 17:38:16 +0000 (-0400) Subject: gitweb: Don't die_error in git_tag after already printing headers X-Git-Tag: v1.7.3-rc0~38 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d8a94803842989582989fd5f5c3062c49134ad5b;p=git.git 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 Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index d0687f458..a85e2f631 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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 "
\n" . "\n" .