]> git.ipfire.org Git - thirdparty/git.git/commit
checkout: refer to other-worktree branch, not ref
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Thu, 10 Oct 2024 18:39:29 +0000 (20:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Oct 2024 20:09:13 +0000 (13:09 -0700)
commitb8139c8f4e761bd24f4ffc3170203e82c75165e2
tree5777e975a7d4d91b1a0f9177ec4600c9fafef38c
parent777489f9e09c8d0dd6b12f9d90de6376330577a2
checkout: refer to other-worktree branch, not ref

We can only check out commits or branches, not refs in general.  And the
problem here is if another worktree is using the branch that we want to
check out.

Let’s be more direct and just talk about branches instead of refs.

Also replace “be held” with “in use”.  Further, “in use” is not
restricted to a branch being checked out (e.g. the branch could be busy
on a rebase), hence generalize to “or otherwise in use” in the option
description.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
builtin/checkout.c