> I wonder if branch_used_elsewhere() would better in branch.c and based
> around register_checked_out_branch().
Good idea. I see that branch.c already tracks checkout, rebase, bisect
and --update-refs, so the gap Toon found can be closed without special
cases in history.c. Will do in v3.
> For example "git checkout" calls branch_checked_out() but I think it
> really wants to know if a branch is in use elsewhere.
Checkout goes through die_if_checked_out(), which does not see branches
that another worktree's rebase --update-refs is going to update. How
about keeping checkout out of this patch and looking at it afterwards?