Re: [PATCH 5/9] worktree: disallow adding same path multiple times

2018-08-30 Thread Eric Sunshine
On Thu, Aug 30, 2018 at 3:28 AM Jeff King wrote: > On Tue, Aug 28, 2018 at 05:20:22PM -0400, Eric Sunshine wrote: > > + /* > > + * find_worktree()'s suffix matching may undesirably find the main > > + * rather than a linked worktree (for instance, when the basenames > > + * of

Re: [PATCH 5/9] worktree: disallow adding same path multiple times

2018-08-30 Thread Jeff King
On Tue, Aug 28, 2018 at 05:20:22PM -0400, Eric Sunshine wrote: > A given path should only ever be associated with a single registered > worktree. This invariant is enforced by refusing to create a new > worktree at a given path if that path already exists. For example: > > $ git worktree add

[PATCH 5/9] worktree: disallow adding same path multiple times

2018-08-28 Thread Eric Sunshine
A given path should only ever be associated with a single registered worktree. This invariant is enforced by refusing to create a new worktree at a given path if that path already exists. For example: $ git worktree add -q --detach foo $ git worktree add -q --detach foo fatal: 'foo'