summaryrefslogtreecommitdiff
path: root/t/t5318-commit-graph.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5318-commit-graph.sh')
-rwxr-xr-xt/t5318-commit-graph.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index 3f03de6018..39e2918a32 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -3,6 +3,8 @@
test_description='commit graph'
. ./test-lib.sh
+GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=0
+
test_expect_success 'setup full repo' '
mkdir full &&
cd "$TRASH_DIRECTORY/full" &&
@@ -19,8 +21,8 @@ test_expect_success 'verify graph with no graph file' '
test_expect_success 'write graph with no packs' '
cd "$TRASH_DIRECTORY/full" &&
- git commit-graph write --object-dir . &&
- test_path_is_missing info/commit-graph
+ git commit-graph write --object-dir $objdir &&
+ test_path_is_missing $objdir/info/commit-graph
'
test_expect_success 'exit with correct error on bad input to --stdin-packs' '
@@ -43,7 +45,7 @@ test_expect_success 'create commits and repack' '
test_expect_success 'exit with correct error on bad input to --stdin-commits' '
cd "$TRASH_DIRECTORY/full" &&
echo HEAD | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
- test_i18ngrep "invalid commit object id" stderr &&
+ test_i18ngrep "unexpected non-hex object ID: HEAD" stderr &&
# valid tree OID, but not a commit OID
git rev-parse HEAD^{tree} | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
test_i18ngrep "invalid commit object id" stderr
@@ -481,7 +483,7 @@ test_expect_success 'detect bad version' '
'
test_expect_success 'detect bad hash version' '
- corrupt_graph_and_verify $GRAPH_BYTE_HASH "\02" \
+ corrupt_graph_and_verify $GRAPH_BYTE_HASH "\03" \
"hash version"
'
@@ -629,7 +631,7 @@ test_expect_success 'corrupt commit-graph write (broken parent)' '
empty="$(git mktree </dev/null)" &&
cat >broken <<-EOF &&
tree $empty
- parent 0000000000000000000000000000000000000000
+ parent $ZERO_OID
author whatever <whatever@example.com> 1234 -0000
committer whatever <whatever@example.com> 1234 -0000
@@ -650,7 +652,7 @@ test_expect_success 'corrupt commit-graph write (missing tree)' '
cd repo &&
tree="$(git mktree </dev/null)" &&
cat >broken <<-EOF &&
- parent 0000000000000000000000000000000000000000
+ parent $ZERO_OID
author whatever <whatever@example.com> 1234 -0000
committer whatever <whatever@example.com> 1234 -0000