git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rada <marada@uwaterloo.ca>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>
Subject: Re: [RFC/PATCH v4 1/2] gitweb: check given hash before trying to create snapshot
Date: Sun, 13 Sep 2009 01:37:37 -0400	[thread overview]
Message-ID: <4AAC8521.1060005@mailservices.uwaterloo.ca> (raw)
In-Reply-To: <7vmy4z4j35.fsf@alter.siamese.dyndns.org>

On 09-09-12 11:30 PM, Junio C Hamano wrote:
>> @@ -5196,8 +5202,9 @@ sub git_snapshot {
>>  		die_error(403, "Unsupported snapshot format");
>>  	}
>>  
>> -	if (!defined $hash) {
>> -		$hash = git_get_head_hash($project);
>> +	my $full_hash = git_get_full_hash($project, $hash);
>> +	if (!$full_hash) {
>> +		die_error(404, 'Hash id was not valid');
>>  	}
> 
> This is in the context of "snapshot", so obviously you care more about
> just "such an object exists", don't you?  You also want it to be a
> tree-ish.  Try giving it $hash = 'junio-gpg-pub' and see how it breaks.
 
You have confused me. How is using 'junio-gpg-pub' different from the 
second test case that tries to use 'frizzumFrazzum'?


-- 
Mark Rada (ferrous26)
marada@uwaterloo.ca

  reply	other threads:[~2009-09-13  5:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13  0:09 [RFC/PATCH v4 1/2] gitweb: check given hash before trying to create snapshot Mark Rada
2009-09-13  3:30 ` Junio C Hamano
2009-09-13  5:37   ` Mark Rada [this message]
2009-09-13  5:42     ` Junio C Hamano
2009-09-13 15:03       ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2009-09-12 23:03 Mark Rada

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=4AAC8521.1060005@mailservices.uwaterloo.ca \
    --to=marada@uwaterloo.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.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).