]> git.ipfire.org Git - thirdparty/git.git/commit
pickaxe tests: refactor to use test_commit --append --printf
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 12 Apr 2021 17:15:09 +0000 (19:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:47:31 +0000 (12:47 +0900)
commit6d0a40166e87a78ca17fddeee25228ded92a169e
treeeaa871b6dcf8c72f261d1bbeaa6013b845bbcb2a
parentecbff141a1c6e4a32a43f90db70cde2b2199b241
pickaxe tests: refactor to use test_commit --append --printf

Refactor the existing tests added in e0e7cb8080c (log -G: ignore
binary files, 2018-12-14) to use the --append option I added in
3373518cc8b (test-lib functions: add an --append option to
test_commit, 2021-01-12) and the --printf option added as part of an
in-flight topic of mine this commit depends on.

While I'm at it change some of the setup of the test to use a more
sensible pattern, e.g. setting up a temporary repo instead of creating
an orphan branch.

Since the -G and -S options will behave the same way with truncated
and removed content also change the "git rm" to emptying data.bin,
that's just catering to how test_commit works. The resulting test is
shorter.

See also f5d79bf7dd6 (tests: refactor a few tests to use "test_commit
--append", 2021-01-12) for prior similar refactoring.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4209-log-pickaxe.sh