Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:33

Jeff King [off-list ref] writes:
On Thu, Mar 28, 2013 at 02:04:27PM +0100, Michael Haggerty wrote:
quoted
$ git rev-parse --verify 1111111111111111111111111111111111111111
1111111111111111111111111111111111111111
$ echo $?
0

[...]

I believe that "git rev-parse --verify" is meant to verify that the
argument is an actual object, and that it should reject fictional SHA1s.
 (If not then the documentation should be clarified.)  The same problem
also exists in 1.8.2 but I haven't checked how much older it is.
I think it is only about verifying the name of the object. I.e., that
you can resolve the argument to an object. It has always behaved this
way; I even just tested with git v0.99.
Correct.  It is about "is it well formed and something we can turn
into 20-byte object name?" and nothing more.  It certainly does not
mean "do we have it?", as the function needs to be able to validate
something we do not yet have.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help