]> git.ipfire.org Git - thirdparty/git.git/commit
t3415: increase granularity of test_auto_{fixup,squash}()
authorDenton Liu <liu.denton@gmail.com>
Tue, 7 Jan 2020 04:53:08 +0000 (23:53 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jan 2020 20:56:02 +0000 (12:56 -0800)
commitc232ffa83cb3b21e4e6671c50609bfaf5659e899
tree89f8c39d6b407ed7d6325bcd36fcc90ed56ca0e4
parenta781cd6fefcb40297cdb52cb02e7cb6b940598f2
t3415: increase granularity of test_auto_{fixup,squash}()

We are using `test_must_fail test_auto_{fixup,squash}` which would
ensure that the function failed. However, this is a little ham-fisted as
there is no way of ensuring that the expected part of the function
actually fails.

Increase the granularity by accepting an optional `!` first argument
which will check that the rebase does not squash in any commits by
ensuring that there are still 4 commits. If `!` is not provided, the old
logic is run.

This patch may be better reviewed with `--ignore-all-space`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3415-rebase-autosquash.sh