]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5318-commit-graph.sh
commit-graph: don't pass filename to load_commit_graph_one_fd_st()
[thirdparty/git.git] / t / t5318-commit-graph.sh
index 725b7ce51f06d7154ac45e831a7fa099859edb7a..0d012f55e559e83823ff27235f60a83b1ba4c5fd 100755 (executable)
@@ -376,7 +376,8 @@ corrupt_graph_verify() {
        grepstr=$1
        test_must_fail git commit-graph verify 2>test_err &&
        grep -v "^+" test_err >err &&
-       test_i18ngrep "$grepstr" err
+       test_i18ngrep "$grepstr" err &&
+       git status --short
 }
 
 # usage: corrupt_graph_and_verify <position> <data> <string> [<zero_pos>]
@@ -399,6 +400,12 @@ corrupt_graph_and_verify() {
 
 }
 
+test_expect_success 'detect too small' '
+       corrupt_graph_setup &&
+       echo "a small graph" >$objdir/info/commit-graph &&
+       corrupt_graph_verify "too small"
+'
+
 test_expect_success 'detect bad signature' '
        corrupt_graph_and_verify 0 "\0" \
                "graph signature"