Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 03:58:04 +0300
committerJunio C Hamano <gitster@pobox.com>2020-09-19 03:58:04 +0300
commit45f462b5c5a55039c35fc7001f2256329220bf4f (patch)
treeebac01e4f5554e4bde0572454fbe9e85a087e5bc /builtin/worktree.c
parent694e517778243256b748819cc60eff6011238a0a (diff)
parentdccadad736c801e924c7c14e8c6bd1a6e15e70e5 (diff)
Merge branch 'es/wt-add-detach'
"git worktree add" learns that the "-d" is a synonym to "--detach" option to create a new worktree without being on a branch. * es/wt-add-detach: git-worktree.txt: discuss branch-based vs. throwaway worktrees worktree: teach `add` to recognize -d as shorthand for --detach git-checkout.txt: document -d short option for --detach
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index bb70fde97e..99abaeec6c 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -555,7 +555,7 @@ static int add(int ac, const char **av, const char *prefix)
N_("create a new branch")),
OPT_STRING('B', NULL, &new_branch_force, N_("branch"),
N_("create or reset a branch")),
- OPT_BOOL(0, "detach", &opts.detach, N_("detach HEAD at named commit")),
+ OPT_BOOL('d', "detach", &opts.detach, N_("detach HEAD at named commit")),
OPT_BOOL(0, "checkout", &opts.checkout, N_("populate the new working tree")),
OPT_BOOL(0, "lock", &opts.keep_locked, N_("keep the new working tree locked")),
OPT__QUIET(&opts.quiet, N_("suppress progress reporting")),