Re: [PATCH v3 14/22] worktree: add: suppress auto-vivication with --detach and no <branch>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <branch> omitted. Instead, treat:
> 
>     git worktree add --detach <path>
> 
> as shorthand for:
> 
>     git worktree add --detach <path> HEAD
> 
> Signed-off-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
> ---
>  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 <sunshine@xxxxxxxxxxxxxx>
Subject: [PATCH v3 23/22] fixup! worktree: add: suppress auto-vivication with --detach and no <branch>

Signed-off-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
---
 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 `<path>` and checkout `<branch>` 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 `<branch>` 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 <path>)` was specified.
+If `<branch>` 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 <path>)` was specified.
 
 prune::
 
-- 
2.5.0.rc2.378.g0af52e8

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]