Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-27 Thread Jeff King
On Mon, Aug 27, 2018 at 05:55:43AM -0400, Eric Sunshine wrote: > On Fri, Aug 24, 2018 at 7:25 PM Jeff King wrote: > > On Fri, Aug 24, 2018 at 06:55:24PM -0400, Eric Sunshine wrote: > > > On Fri, Aug 24, 2018 at 10:47 AM Duy Nguyen wrote: > > > > > I was thinking that "worktree add" could start

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-27 Thread Eric Sunshine
On Fri, Aug 24, 2018 at 7:25 PM Jeff King wrote: > On Fri, Aug 24, 2018 at 06:55:24PM -0400, Eric Sunshine wrote: > > On Fri, Aug 24, 2018 at 10:47 AM Duy Nguyen wrote: > > > > I was thinking that "worktree add" could start respecting the --force > > > > option as an escape hatch. > > > > > >

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-24 Thread Jeff King
On Fri, Aug 24, 2018 at 06:55:24PM -0400, Eric Sunshine wrote: > On Fri, Aug 24, 2018 at 10:47 AM Duy Nguyen wrote: > > On Thu, Aug 23, 2018 at 8:21 PM Eric Sunshine > > wrote: > > > Peff wrote: > > > > Yes, but then what's the next step for my script? I can't "remove" since > > > > the

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-24 Thread Eric Sunshine
On Fri, Aug 24, 2018 at 10:47 AM Duy Nguyen wrote: > On Thu, Aug 23, 2018 at 8:21 PM Eric Sunshine wrote: > > Peff wrote: > > > Yes, but then what's the next step for my script? I can't "remove" since > > > the worktree isn't there. I can't blow away any directory that I know > > > about, since

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-24 Thread Duy Nguyen
Jeff, you're doing crazy things beyond my (admittedly very limited) imagination :P I did not see this at all when I implemented the worktree stuff. On Thu, Aug 23, 2018 at 8:21 PM Eric Sunshine wrote: > > > In this case, it might make sense for "git worktree add" to refuse to > > > operate if an

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-23 Thread Eric Sunshine
On Tue, Aug 21, 2018 at 4:43 PM Jeff King wrote: > On Tue, Aug 21, 2018 at 04:22:08PM -0400, Eric Sunshine wrote: > > On Tue, Aug 21, 2018 at 3:36 PM Jeff King wrote: > > How about using "git clone --shared" instead? > > That seems even more dangerous to me, since the created clone can become >

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-21 Thread Jeff King
On Tue, Aug 21, 2018 at 04:22:08PM -0400, Eric Sunshine wrote: > On Tue, Aug 21, 2018 at 3:36 PM Jeff King wrote: > > The script does basically this to set up the temporary tree: > > > > test -d $tmp || git worktree add $tmp ... > > > > The script never cleans up the worktree (since its

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-21 Thread Eric Sunshine
On Tue, Aug 21, 2018 at 3:36 PM Jeff King wrote: > The script does basically this to set up the temporary tree: > > test -d $tmp || git worktree add $tmp ... > > The script never cleans up the worktree (since its results can often be > reused between runs), but you may do so with "rm" or "git

worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-21 Thread Jeff King
On Tue, Aug 21, 2018 at 03:23:21PM -0400, Jeff King wrote: > We already advise people to make sure their documentation > formats correctly. Let's point them at the doc-diff script, > which can help with that. > > Let's also put a brief note in the script about its purpose, > since that otherwise