From 5c942570fe2a48d8fde348e89392c2e9e23aa483 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Fri, 17 Jul 2015 19:00:09 -0400 Subject: worktree: add: suppress auto-vivication with --detach and no 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 Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-worktree.txt') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 32344598c3..332dd7734d 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:: -- cgit v1.2.3