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

Re: git name-rev not accepting abbreviated SHA with --stdin

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:39

On Fri, Jul 3, 2015 at 6:26 PM, Sitaram Chamarty [off-list ref] wrote:
Jokes apart, I'm not sure the chances of *both* those things happening
-- an accidental hash-like string in the text *and* it matching an
existing hash -- are high enough to bother.  If it can be done without
too much code, it probably should.
To be fair to the original implementor, I think we didn't have an API to ask
"do we have a committish object with this name?" with an abbreviated SHA-1.
All we had was "do we have an object with this name?".

As the only answer the command can give is an exteneded SHA-1 for
committish, it is understandable that hitting blobs and trees (which typically
are much more numerous than committishes) with false positives would have
been a real risk the implementation wanted to avoid.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help