Skip to content

pr-2192/yoichi/worktree-add-should-not-dwim-with-b-v2

tagged this 05 Aug 12:16
From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>

git worktree add <path> <branch> DWIMs <branch> to a
remote-tracking branch when neither -b, -B, nor --detach
is given.

However, git worktree add -b <new-branch> <path> <branch> can
still DWIM <branch>, causing <new-branch> to be ignored.

This is a regression introduced in v2.42.0
(128e5496b325640f0a09cc1d5b1e346c069b410f).

Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2192.v2.git.1785932208004.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2192.git.1785852032626.gitgitgadget@gmail.com
Assets 2
Loading