Re: Bug in "git rev-parse --verify"
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Mar 30, 2013, 08:09 UTC
- Message-ID
- <51569DB0.1010102@alum.mit.edu>
- In-Reply-To
- <7vhajtpdtc.fsf@alter.siamese.dyndns.org>
On 03/30/2013 08:05 AM, Junio C Hamano wrote:
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> What we may want is another type peeling operator, ^{object}.
>> that makes sure it is an object, like this:
>>
>> rev-parse --verify 572a535454612a046e7dd7404dcca94d6243c788^{object}
>>
>> It asks "I have this 40-hex; I want an object out of it", just like
>> frotz^{tree} is "I have 'frotz'; I want a tree-ish" for any value of
>> 'frotz'.
>>
>> With that, a use case that it wants to see _any_ object can safely
>> use 'rev-parse --verify "$userinput^{object}' without an annotated
>> tag getting in the way.
>>
>> How does that sound?
>
> Perhaps something like this. Note that the last hunk is unrelated
> thinko-fix I noticed while browsing the code.Sounds reasonable to me. I'm not familiar with this code, but your change looks simple enough. Plus documentation change in Documentation/revisions.txt, of course.
Thanks, Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/