Re: [PATCH v2] bisect: fix "reset" when branch is checked out elsewhere

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

 



On 06-feb-2023 14:29:03, Junio C Hamano wrote:
> Rubén Justo <rjusto@xxxxxxxxx> writes:
> 
> > Since 1d0fa89 (checkout: add --ignore-other-wortrees, 2015-01-03) we
> > have a safety valve in checkout/switch to prevent the same branch from
> > being checked out simultaneously in multiple worktrees.
> >
> > If a branch is bisected in a worktree while also being checked out in
> > another worktree; when the bisection is finished, checking out the
> > branch back in the current worktree may fail.
> 
> Sorry for asking possibly the same question again (which may mean

No problem.  I am sorry because I don't understand what's worrying you.

> that the phrasing of this paragraph is misleading), but isn't it a
> good thing if in this sequence:
> 
>  - I checkout 'main' and start bisecting (BISECT_HEAD says 'main');
> 
>  - I then checkout 'main' in another worktree; I may even make a
>    commit or two, or even rename 'main' to 'master'.
> 
>  - I finish bisection and "bisect reset" tries to take me back to
>    'main', which may notice that 'main' is checked out in the other
>    worktree, and fail.
> 
> the last one failed?  After the above sequence, I now have two
> worktrees, both checking out 'main', and it is exactly the situation
> the safety valve tries to prevent from occuring, no?

We are considering the initial branch (BISECT_START) as a branch checked
out _implicitly_ in the worktree that is bisecting.  Doesn't that
provide us and the user enough safety?  And is this not enough safety
for us to allow "git bisect reset"?  Just "git bisect reset", without
any other argument.



[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