]> git.ipfire.org Git - thirdparty/git.git/commit
t2407: test bisect and rebase as black-boxes
authorDerrick Stolee <derrickstolee@github.com>
Tue, 19 Jul 2022 18:33:33 +0000 (18:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jul 2022 19:49:03 +0000 (12:49 -0700)
commit1bec4d1dfd68653c6590a0cf0bf12831810bc21e
tree61657fa1cb5719a2e60b40cabc65cf2d961779c8
parent7fefa1b68ee171db0de966b7dfdcba741b3f2ddf
t2407: test bisect and rebase as black-boxes

The tests added by d2ba271aad0 (branch: check for bisects and rebases,
2022-06-14) modified hidden state to verify the branch_checked_out()
helper. While this indeed checks that the method implementation is _as
designed_, it doesn't show that it is _correct_. Specifically, if 'git
bisect' or 'git rebase' change their back-end for preserving refs, then
these tests do not demonstrate that drift as a bug in
branch_checked_out().

Modify the tests in t2407 to actually rely on a paused bisect or rebase.
This requires adding the !SANITIZE_LEAK prereq for tests using those
builtins. The logic is still tested for leaks in the final test which
does set up that back-end directly for an error state that should not be
possible using Git commands.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2407-worktree-heads.sh