"add worktree" fails with "fatal: Invalid path" error

2019-05-12 Thread Shaheed Haque
Hi, I'm running git v.2.20.1 on Ubuntu from a program which follows the pattern: 1. create a temporary directory /tmp/tmpabc 2. in a loop: 2a. create a second level of temporary directory /tmp/tmpabc/tmpworktree123 2b. use "git worktree add" on the second level directory

Re: [PATCH] worktree add: be tolerant of corrupt worktrees

2019-05-13 Thread Shaheed Haque
6 (worktree: disallow adding same path multiple > times, 2018-08-28), or since v2.20.0. Though the real bug in > find_worktree() is much older. > > Reported-by: Shaheed Haque > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > t/t2025-worktree-add.sh | 12 > wo

Re: "add worktree" fails with "fatal: Invalid path" error

2019-05-13 Thread Shaheed Haque
Hi Duy, On Mon, 13 May 2019 at 10:21, Duy Nguyen wrote: > > On Sun, May 12, 2019 at 5:14 PM Shaheed Haque wrote: > > > > Hi, > > > > I'm running git v.2.20.1 on Ubuntu from a program which follows the pattern: > > > > > > 1. crea

Re: "add worktree" fails with "fatal: Invalid path" error

2019-05-14 Thread Shaheed Haque
On Tue, 14 May 2019 at 13:34, Duy Nguyen wrote: > > On Mon, May 13, 2019 at 7:55 PM Shaheed Haque wrote: > > The original code used the more obvious "git worktree remove" rather > > than "git worktree prune" but I switched partly because remove seemed >

Re: [PATCH] worktree add: be tolerant of corrupt worktrees

2019-06-01 Thread Shaheed Haque
On Sat, 18 May 2019 at 12:50, Duy Nguyen wrote: > > On Fri, May 17, 2019 at 2:46 PM Eric Sunshine wrote: > > > > On Mon, May 13, 2019 at 6:50 AM Nguyễn Thái Ngọc Duy > > wrote: > > > find_worktree() can die() unexpectedly because it uses real_path() > > > instead of the gentler version. When it