Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-03-10 Thread Junio C Hamano
Duy Nguyen writes: > Junio, it seems 2/2 is stuck in an endless discussion. But 1/2 is good > regardless, maybe pick it up now and let 2/2 come later whenever it's > ready? Thanks for poking, and I think it is a good idea.

Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-03-08 Thread Eric Sunshine
On Fri, Mar 8, 2019 at 4:20 AM Duy Nguyen wrote: > Junio, it seems 2/2 is stuck in an endless discussion. But 1/2 is good > regardless, maybe pick it up now and let 2/2 come later whenever it's > ready? Yep, 1/2 seems a good idea and has not been controversial. It may not solve all the race condi

Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-03-08 Thread Duy Nguyen
Junio, it seems 2/2 is stuck in an endless discussion. But 1/2 is good regardless, maybe pick it up now and let 2/2 come later whenever it's ready? On Wed, Feb 20, 2019 at 11:16 PM Michal Suchanek wrote: > > Git runs a stat loop to find a worktree name that's available and then does > mkdir on th

Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-02-20 Thread Michal Suchánek
On Wed, 20 Feb 2019 11:34:54 -0500 Eric Sunshine wrote: > On Wed, Feb 20, 2019 at 11:17 AM Michal Suchanek wrote: > > 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 ad

Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-02-20 Thread Eric Sunshine
On Wed, Feb 20, 2019 at 11:17 AM Michal Suchanek wrote: > 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. > > Sign

[PATCH v3 1/2] worktree: fix worktree add race.

2019-02-20 Thread Michal Suchanek
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. Signed-off-by: Michal Suchanek --- v2: - simplify loop exit condition