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@xxxxxxxxxx> --- Documentation/git-worktree.txt | 2 +- builtin/worktree.c | 4 ++-- 2 files changed, 3 insertions(+), 3 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..b3373fbbd6 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -15,9 +15,9 @@ #include "worktree.h" #include "quote.h" -#define BUILTIN_WORKTREE_ADD_USAGE \ +#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 \ -- 2.37.4