]> git.ipfire.org Git - thirdparty/git.git/commit
t3432: distinguish "noop-same" v.s. "work-same" in "same head" tests
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 25 Aug 2019 09:12:02 +0000 (05:12 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Aug 2019 19:34:56 +0000 (12:34 -0700)
commit4336d365123e45be0ed4a7286df54ccce560d55f
tree28ab3e83c5e2358f66e249e8726e71a565076b50
parent793ac7e309437e2225825370a9c7a0f1ccb39480
t3432: distinguish "noop-same" v.s. "work-same" in "same head" tests

Change "same head" introduced in the preceding commit to check whether
the rebase.c code lands in the can_fast_forward() case in, and thus
prints out an "is up to date" and aborts early.

In some of these cases we make it past that and to "rewinding head",
then do a rebase, only to find out there's nothing to change so HEAD
stays at the same OID.

These tests presumed these two cases were the same thing. In terms of
where HEAD ends up they are, but we're not only interested in rebase
semantics, but also whether or not we're needlessly doing work when we
could avoid it entirely.

I'm adding "same" and "diff" here because I'll follow-up and add
--no-ff tests, where some of those will be "diff"-erent, so add the
"diff" code already.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3432-rebase-fast-forward.sh