]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5318-commit-graph.sh
commit-graph tests: split up corrupt_graph_and_verify()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 21 Feb 2019 22:37:46 +0000 (23:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Feb 2019 22:29:49 +0000 (14:29 -0800)
commitf6761faaa17a98c025b34fffeeec71f0ec223b2d
tree249065a2dfb3c0c842e87822bef995efe908f4a7
parent35ee755a8c43bcb3c2786522d423f006c23d32df
commit-graph tests: split up corrupt_graph_and_verify()

Split up the corrupt_graph_and_verify() function added in
d9b9f8a6fd ("commit-graph: verify catches corrupt signature",
2018-06-27) into its logical components of setting up the test itself,
doing the corruption in a particular way with "dd", and then finally
testing that stderr is what we expect.

This allows for re-using everything except the now slimmer
corrupt_graph_and_verify() to corrupt the graph in a way that doesn't
involve inserting a given byte sequence at a given position,
e.g. truncating it entirely to a custom value.

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