On Fri, Feb 15, 2019 at 1:59 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > Michal Suchanek <msuchanek@xxxxxxx> writes: > > Git runs a stat loop to find a worktree name that's available and then does > > mkdir on the found name. Turn it to mkdir loop to avoid another invocation of > > worktree add finding the same free name and creating the directory first. > > Yeah, relying on the atomicity of mkdir(2) is much saner approach > than "check -- ah we can use the name -- try to create" that is race > prone. Yep. When you re-roll, please mention [1] in the cover letter or in the commentary section of this patch (after the "---" line below your sign-off) to provide context to reviewers. Also, when re-rolling, please Cc: people involved in that earlier discussion (whom I've added to the Cc: of this reply). Thanks. [1]: http://public-inbox.org/git/CAPig+cSdpq0Bfq3zSK8kJd6da3dKixK7qYQ24=ZwbuQtsaLNZw@xxxxxxxxxxxxxx/