summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Abel <jacobabel@nullpo.dev>2022-11-10 23:32:49 +0000
committerTaylor Blau <me@ttaylorr.com>2022-11-10 21:44:41 -0500
commitdde931def7c89308169f02f8dd751d4e45f46743 (patch)
tree30c8f425c86375cc6508d46b1555c48138157669
parent3b08839926fcc7cc48cf4c759737c1a71af430c1 (diff)
downloadgit-dde931def7c89308169f02f8dd751d4e45f46743.tar.gz
worktree add: Include -B in usage docs
While -B behavior is already documented, it was not included in the usage docs for either the man page or the help text. This change fixes that and brings the usage docs in line with how the flags are documented in other commands such as git checkout. Signed-off-by: Jacob Abel <jacobabel@nullpo.dev> Signed-off-by: Taylor Blau <me@ttaylorr.com>
-rw-r--r--Documentation/git-worktree.txt2
-rw-r--r--builtin/worktree.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 063d6eeb99..4dd658012b 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]]
- [-b <new-branch>] <path> [<commit-ish>]
+ [[-b | -B] <new-branch>] <path> [<commit-ish>]
'git worktree list' [-v | --porcelain [-z]]
'git worktree lock' [--reason <string>] <worktree>
'git worktree move' <worktree> <new-path>
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 4a24d53be1..fccb17f070 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -17,7 +17,7 @@
#define BUILTIN_WORKTREE_ADD_USAGE \
N_("git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]]\n" \
- " [-b <new-branch>] <path> [<commit-ish>]")
+ " [[-b | -B] <new-branch>] <path> [<commit-ish>]")
#define BUILTIN_WORKTREE_LIST_USAGE \
N_("git worktree list [-v | --porcelain [-z]]")
#define BUILTIN_WORKTREE_LOCK_USAGE \