Merge branch 'jh/loose-object-dirs-creation-race'
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 20:54:14 +0000 (12:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 20:54:14 +0000 (12:54 -0800)
When two processes created one loose object file each, which fell
into the same fan-out bucket that previously did not have any
objects, they both tried to do an equivalent of

mkdir .git/objects/$fanout &&
chmod $shared_perm .git/objects/$fanout

before writing into their file .git/objects/$fanout/$remainder,
one of which could have failed unnecessarily when the second
invocation of mkdir found that the directory already has been
created by the first one.

* jh/loose-object-dirs-creation-race:
sha1_file.c:create_tmpfile(): Fix race when creating loose object dirs

1  2 
sha1_file.c
diff --cc sha1_file.c
Simple merge