git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Anders Kaseorg <andersk@MIT.EDU>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Don’t die_error in git_tag after already printing headers
Date: Tue, 31 Aug 2010 09:19:35 -0700 (PDT)	[thread overview]
Message-ID: <m37hj6oivq.fsf@localhost.localdomain> (raw)
In-Reply-To: <alpine.DEB.2.00.1008271337310.25632@dr-wily.mit.edu>

Anders Kaseorg <andersk@MIT.EDU> writes:

> This fixes an XML error when visiting a nonexistent tag
> (?p=git.git;a=tag;h=refs/tags/BADNAME).
> 
> Signed-off-by: Anders Kaseorg <andersk@mit.edu>

Good catch!

Acked-by: Jakub Narebski <jnareb@gmail.com>

> ---
>  gitweb/gitweb.perl |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 84261bb..5dab825 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -5192,15 +5192,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" .
> -- 
> 1.7.2.2
> 

-- 
Jakub Narebski
Poland
ShadeHawk on #git

      reply	other threads:[~2010-08-31 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 17:38 [PATCH] gitweb: Don’t die_error in git_tag after already printing headers Anders Kaseorg
2010-08-31 16:19 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37hj6oivq.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=andersk@MIT.EDU \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).