Skip to content

Commit 1f1304d

Browse files
ttaylorrgitster
authored andcommitted
t5318: reorder test below 'graph_read_expect'
In the subsequent commit, we will introduce a dependency on 'graph_read_expect' from t5318.7. Preemptively move it below 'graph_read_expect()'s definition so that the test can call it. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0ec2d0f commit 1f1304d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

t/t5318-commit-graph.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ test_expect_success 'create commits and repack' '
4242
git repack
4343
'
4444

45-
test_expect_success 'exit with correct error on bad input to --stdin-commits' '
46-
cd "$TRASH_DIRECTORY/full" &&
47-
echo HEAD | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
48-
test_i18ngrep "unexpected non-hex object ID: HEAD" stderr &&
49-
# valid tree OID, but not a commit OID
50-
git rev-parse HEAD^{tree} | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
51-
test_i18ngrep "invalid commit object id" stderr
52-
'
53-
5445
graph_git_two_modes() {
5546
git -c core.commitGraph=true $1 >output
5647
git -c core.commitGraph=false $1 >expect
@@ -91,6 +82,15 @@ graph_read_expect() {
9182
test_cmp expect output
9283
}
9384

85+
test_expect_success 'exit with correct error on bad input to --stdin-commits' '
86+
cd "$TRASH_DIRECTORY/full" &&
87+
echo HEAD | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
88+
test_i18ngrep "unexpected non-hex object ID: HEAD" stderr &&
89+
# valid tree OID, but not a commit OID
90+
git rev-parse HEAD^{tree} | test_expect_code 1 git commit-graph write --stdin-commits 2>stderr &&
91+
test_i18ngrep "invalid commit object id" stderr
92+
'
93+
9494
test_expect_success 'write graph' '
9595
cd "$TRASH_DIRECTORY/full" &&
9696
git commit-graph write &&

0 commit comments

Comments
 (0)