Re: [PATCH 2/2] branch: error message checking out a branch in use

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

 



On 7/8/23 23:34, Taylor Blau wrote:
> On Mon, Aug 07, 2023 at 10:42:40PM +0200, Rubén Justo wrote:
>> Let's update the error message we show when the user tries to check out
>> a branch which is being used in another worktree, following the
>> guideline reasoned in 4970bedef2 (branch: update the message to refuse
>> touching a branch in-use, 2023-07-21).
>>
>> Signed-off-by: Rubén Justo <rjusto@xxxxxxxxx>
>> ---
>>  branch.c                | 2 +-
>>  t/t2400-worktree-add.sh | 3 ++-
>>  t/t3400-rebase.sh       | 2 +-
>>  3 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/branch.c b/branch.c
>> index 3e4684f79f..98c199f7b7 100644
>> --- a/branch.c
>> +++ b/branch.c
>> @@ -838,7 +838,7 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree)
>>
>>  		if (is_shared_symref(worktrees[i], "HEAD", branch)) {
>>  			skip_prefix(branch, "refs/heads/", &branch);
>> -			die(_("'%s' is already checked out at '%s'"),
>> +			die(_("'%s' already used by worktree at '%s'"),
> 
> I wonder if "'%s' is already used by ..." (with the additional "is"
> between the branch name and "already") would be clearer / more natural.

I have no problem with that change.  I think I was trying to keep the message
sort ... the tests does not need to be adjusted.

> 
> Thanks,
> Taylor
> 

Thanks for reading carefully.




[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