Re: [PATCH] checkout: refer to other-worktree branch, not ref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 9, 2024, at 20:46, Junio C Hamano wrote:
> 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. :)

>
>>  --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






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux