Re: [PATCH v3 3/4] rebase: refuse to switch to a branch already checked out elsewhere (test)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 8, 2023, 05:19 UTC
- Message-ID
- <xmqqk00svimy.fsf@gitster.g>
- In-Reply-To
- <19e3e0d9-406e-ac2f-c43a-b4e994035529@gmail.com>
Rubén Justo <rjusto@gmail.com> 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.
> 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.