From: Junio C Hamano Date: Wed, 27 Dec 2023 22:52:24 +0000 (-0800) Subject: Merge branch 'jc/checkout-B-branch-in-use' X-Git-Tag: v2.44.0-rc0~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f09e74175dfa5b46587dab3c5dcbad16e9586de3;p=thirdparty%2Fgit.git Merge branch 'jc/checkout-B-branch-in-use' "git checkout -B []" allowed a branch that is in use in another worktree to be updated and checked out, which might be a bit unexpected. The rule has been tightened, which is a breaking change. "--ignore-other-worktrees" option is required to unbreak you, if you are used to the current behaviour that "-B" overrides the safety. * jc/checkout-B-branch-in-use: checkout: forbid "-B " from touching a branch used elsewhere checkout: refactor die_if_checked_out() caller --- f09e74175dfa5b46587dab3c5dcbad16e9586de3