commit-graph: add 'verify' subcommand
[gitweb.git] / t / t5318-commit-graph.sh
index 77d85aefe7da18a0d7cc2db2baaedacead6b2e97..0830ef9fddd553b96986f92eac6c5d54160219ca 100755 (executable)
@@ -11,6 +11,11 @@ test_expect_success 'setup full repo' '
        objdir=".git/objects"
 '
 
+test_expect_success 'verify graph with no graph file' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git commit-graph verify
+'
+
 test_expect_success 'write graph with no packs' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph write --object-dir . &&
@@ -28,8 +33,8 @@ test_expect_success 'create commits and repack' '
 '
 
 graph_git_two_modes() {
-       git -c core.graph=true $1 >output
-       git -c core.graph=false $1 >expect
+       git -c core.commitGraph=true $1 >output
+       git -c core.commitGraph=false $1 >expect
        test_cmp output expect
 }
 
@@ -230,4 +235,9 @@ test_expect_success 'perform fast-forward merge in full repo' '
        test_cmp expect output
 '
 
+test_expect_success 'git commit-graph verify' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git commit-graph verify >output
+'
+
 test_done