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

Re: [PATCH] checkout: do not corrupt HEAD on empty repo

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:47

Erik Faye-Lund [off-list ref] writes:
On Tue, May 8, 2012 at 6:43 PM, Junio C Hamano [off-list ref] wrote:
...
quoted
Hrm, I am of two minds.  Yes, we may want checkout to fail, but at the
same time, we would want to make sure that a failed checkout does not
corrupt the HEAD.
Good point.
quoted
 Perhaps it would make it more palatable if you replaced
"cat .git/HEAD" with "git symbolic-ref HEAD" in the original?
Ah, yes. That's much better. Do you want me to resend (improving the
test and replacing "CRT" with "vsnprintf")? I also spotted a typo in
the commit message ("crasheed" vs "crashed")...
Surely.

By the way, notice I said "we *may* want checkout to fail"?  With the
discussion "why is it wrong to allow 'git checkout' to be no-op in a
freshly created repository" stemming from your other "I do not claim it is
correct but it makes the test pass" message, we may actually want to make
that 'checkout' in the test pass, and then 'test_must_fail git checkout'
in the test would have to go when that happens.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help