Junio C Hamano wrote:
The patch may have been done by a wrong motivation, in that it does
not fundamentally "fix" the itch. The particular "itch" is not
something we are going to promise to the end users, ever, anyway.
Just out of curiosity, is it possible to write a correct fix at all?
Even if the first statement in do_push() locks the HEAD ref, it's not
enough: the program may be wading around in git.c/setup.c when I
switch terminals and change HEAD, right?
So, our position on the matter is: no git command makes any guarantees
with respect to races, correct?