Subject: Re: [PATCH 0/3] extend --ignore-other-worktrees to 'rebase', add hints

From: Gabriel Scherer <[email-masked]>
Date: Sat, 13 Sep 2025 22:02:32 +0200

Thanks for looking!

On 13/09/2025 21:30, Ben Knoble wrote:
> I’m eager to see further reviews, but nothing I saw in this series stuck out as a major problem. I saw we updated the rebase test cases; should we add some more for checkout or worktree?

There is already a check of the --ignore-other-worktrees option for 
'checkout' in t/t2060-switch.sh. The test only records success or 
failure, not hints; but I checked manually that the hints are shown as 
expected.

There are code paths in 'worktree add' that call the same 
die_if_checked_out function, but I did not touch those. They seem to 
support the --force option to disable the check, and we could also have 
a hint to make this self-discoverable. (One could suggest also having a 
--ignore-other-worktrees option in 'worktree' for consistency, but 
unlike 'checkout' the --force option currently has no additional effect 
than ignoring other worktrees.) Please let me know if you think that 
some changes to worktree.c should be included in the present patchset 
for consistency.