Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: Bug in "git rev-parse --verify"

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:56:34

Possibly related (same subject, not in this thread)

On 03/30/2013 08:05 AM, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help