Re: [PATCH v3 3/4] rebase: refuse to switch to a branch already checked out elsewhere (test)

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

 



On 07-feb-2023 21:19:33, Junio C Hamano wrote:
> Rubén Justo <rjusto@xxxxxxxxx> writes:
> 
> > ...  If the tests fail, I think it will be easier and
> > less confusing to reach the original commit where the implementation was
> > done if we keep them separated, rather than combining all three commits.
> 
> No, if the test were in the same commit as the implementation, then
> upon a future test breakage it is easier to see what code the test
> was meant to protect, exactly because it is part of the same commit.

Yes, but my reasoning was that those tests protect what we did in 8d9fdd7
(worktree.c: check whether branch is rebased in another worktree, 2016-04-22)
and in b5cabb4a9 (rebase: refuse to switch to branch already checked out
elsewhere, 2020-02-23), not die_if_checked_out().

> > I'm going to reorder the commits and change to use test_expect_failure().
> 
> Do not do that.  Adding a failing test and flipping the
> expect_failure to expect_success is a sure way to make the series
> harder to review.

Hmm



[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