From: Eric Sunshine Date: Fri, 17 Jul 2015 23:20:40 GMT Subject: Re: [PATCH v3 14/22] worktree: add: suppress auto-vivication with --detach and no Message-ID: <20150717232040.GA85140@flurp.local> In-Reply-To: <1437174017-81687-15-git-send-email-sunshine@sunshineco.com> On Fri, Jul 17, 2015 at 07:00:09PM -0400, Eric Sunshine wrote: > Fix oversight where branch auto-vivication incorrectly kicks in when > --detach is specified and omitted. Instead, treat: > > git worktree add --detach > > as shorthand for: > > git worktree add --detach HEAD > > Signed-off-by: Eric Sunshine > --- > builtin/worktree.c | 2 +- > t/t2025-worktree-add.sh | 14 ++++++++++++++ > 2 files changed, 15 insertions(+), 1 deletion(-) I meant, but forgot, to include a documentation update with this patch. Here it is as a squash-in: ---- 8< ---- From: Eric Sunshine Subject: [PATCH v3 23/22] fixup! worktree: add: suppress auto-vivication with --detach and no Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index da71f50..834a61c 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -51,9 +51,9 @@ Create `` and checkout `` into it. The new working directory is linked to the current repository, sharing everything except working directory specific files such as HEAD, index, etc. + -If `` is omitted and neither `-b` nor `-B` is used, then, as a -convenience, a new branch based at HEAD is created automatically, as if -`-b $(basename )` was specified. +If `` is omitted and neither `-b` nor `-B` nor `--detached` used, +then, as a convenience, a new branch based at HEAD is created automatically, +as if `-b $(basename )` was specified. prune:: -- 2.5.0.rc2.378.g0af52e8