]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'ms/worktree-add-atomic-mkdir'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Apr 2019 17:14:24 +0000 (02:14 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Apr 2019 17:14:24 +0000 (02:14 +0900)
commit20fe798b1bf301f78485a56381ad8dad48b2c670
tree14d934d1b9f1ccd8f8ffee470f9b4893f9c92272
parent31df2c1019733ac22fc848aa2658a0e25af70a79
parent7af01f23678dbaeed37773e37737f2ef3db1cb49
Merge branch 'ms/worktree-add-atomic-mkdir'

"git worktree add" used to do a "find an available name with stat
and then mkdir", which is race-prone.  This has been fixed by using
mkdir and reacting to EEXIST in a loop.

* ms/worktree-add-atomic-mkdir:
  worktree: fix worktree add race
builtin/worktree.c