Merge branch 'ja/dir-rename-doc-markup-fix'
[gitweb.git] / t / t5318-commit-graph.sh
index 16d10ebce82fa1fc2e4396f8d30911541b96d7b6..561796f2809c38d3b5229abd4359f5b72141839e 100755 (executable)
@@ -382,8 +382,8 @@ corrupt_graph_and_verify() {
        test_when_finished mv commit-graph-backup $objdir/info/commit-graph &&
        cp $objdir/info/commit-graph commit-graph-backup &&
        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" count=0 &&
-       dd if=/dev/zero of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=$(($orig_size - $zero_pos)) &&
+       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_must_fail git commit-graph verify 2>test_err &&
        grep -v "^+" test_err >err &&
        test_i18ngrep "$grepstr" err