]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-lib-functions: remove generate_zero_bytes() wrapper
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 9 Feb 2021 21:41:51 +0000 (22:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Feb 2021 21:54:34 +0000 (13:54 -0800)
Since d5cfd142ec1 (tests: teach the test-tool to generate NUL bytes
and use it, 2019-02-14) the generate_zero_bytes() functions has been a
thin wrapper for "test-tool genzeros". Let's have its only user call
that directly instead.

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

index 2ed0c1544da120c10db3afedb656429f12a45613..368d1cfb44884c518ff4c003f4c89170577a467b 100755 (executable)
@@ -529,7 +529,7 @@ corrupt_graph_and_verify() {
        zero_pos=${4:-${orig_size}} &&
        printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc &&
        dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" if=/dev/null &&
-       generate_zero_bytes $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" &&
+       test-tool genzeros $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" &&
        corrupt_graph_verify "$grepstr"
 
 }
index 728bdf9468405e827f5b3fc19da8d29501f0ec18..55d58b4a6acb6f8c944f2ac459fbae528f43e838 100644 (file)
@@ -111,13 +111,6 @@ remove_cr () {
        tr '\015' Q | sed -e 's/Q$//'
 }
 
-# Generate an output of $1 bytes of all zeroes (NULs, not ASCII zeroes).
-# If $1 is 'infinity', output forever or until the receiving pipe stops reading,
-# whichever comes first.
-generate_zero_bytes () {
-       test-tool genzeros "$@"
-}
-
 # In some bourne shell implementations, the "unset" builtin returns
 # nonzero status when a variable to be unset was not set in the first
 # place.