Skip to content

Commit

Permalink
gitweb: Don't die_error in git_tag after already printing headers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andersk authored and gitster committed Aug 31, 2010
1 parent eec0daf commit d8a9480
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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" .
Expand Down

0 comments on commit d8a9480

Please sign in to comment.