Re: [PATCH] checkout: refer to other-worktree branch, not ref
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Oct 10, 2024, 18:23 UTC
- Message-ID
- <23f2006d-145f-4cea-ab36-859eb2e87489@app.fastmail.com>
- In-Reply-To
- <xmqqh69lru6e.fsf@gitster.g>
On Wed, Oct 9, 2024, at 20:46, Junio C Hamano wrote:
Show 6 quoted lines
> A branch "in use" includes, but is not limited to, being checked > out. For example, "git rebase" may first detach the HEAD when it > goes to work, but it fully intends to switch back to the branch it > rebased when it is done. It does not want somebody else mucking > with the branch from other worktrees, so "checkout" or "switch" > would consider such a branch is "in use".
I did not know that checkout and friends respect branches which are preocuppied with (e.g.) a rebase. But I’m glad to learn that they do. :)
Show 19 quoted lines
> >> --ignore-other-worktrees:: >> - `git checkout` refuses when the wanted ref is already checked >> - out by another worktree. This option makes it check the ref >> - out anyway. In other words, the ref can be held by more than one >> + `git checkout` refuses when the wanted branch is already checked >> + out by another worktree. This option makes it check the branch >> + out anyway. In other words, the branch can be held by more than one >> worktree. > > As you are updating the usage string, we may want to unify the use > of the same word, just like the original said "be held" here to > match "is holding" over there. Perhaps > > ... branch is already checked out or otherwise in use by > another worktree. ... the branch can be in use by more than > one worktree. > > or something?
Nice. I like it.
-- Kristoffer Haugsbakk