summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-09-18 17:58:04 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-09-18 17:58:04 -0700
commit45f462b5c5a55039c35fc7001f2256329220bf4f (patch)
treeebac01e4f5554e4bde0572454fbe9e85a087e5bc /builtin
parentMerge branch 'jk/add-i-fixes' (diff)
parentgit-worktree.txt: discuss branch-based vs. throwaway worktrees (diff)
downloadtgif-45f462b5c5a55039c35fc7001f2256329220bf4f.tar.xz
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')
-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")),