]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5318: reorder test below 'graph_read_expect'
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 May 2020 21:59:51 +0000 (15:59 -0600)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 May 2020 19:51:11 +0000 (12:51 -0700)
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 <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5318-commit-graph.sh

index 39e2918a324895189fd078b67b95fbe7cb8ffd1c..89020d3d441341ce9b1181264d571f13e27c36fa 100755 (executable)
@@ -42,15 +42,6 @@ test_expect_success 'create commits and repack' '
        git 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 "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
-'
-
 graph_git_two_modes() {
        git -c core.commitGraph=true $1 >output
        git -c core.commitGraph=false $1 >expect
@@ -91,6 +82,15 @@ graph_read_expect() {
        test_cmp expect output
 }
 
+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 "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
+'
+
 test_expect_success 'write graph' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph write &&