Skip to content

Commit dd14948

Browse files
committed
fixup! t1092: test interesting sparse-checkout scenarios
Making the 'blame with pathspec outside sparse definition' test more robust. Previously, this test just looked for a generic "failure" and didn't verify that sparse index and non-sparse index provide the same error. We now fail only when the error messages from sparse index and non-sparse index don't match (and still document the behavior in the test). Signed-off-by: Lessley Dennington <[email protected]>
1 parent 058b7a9 commit dd14948

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,14 @@ test_expect_success 'blame with pathspec inside sparse definition' '
488488

489489
# TODO: blame currently does not support blaming files outside of the
490490
# sparse definition. It complains that the file doesn't exist locally.
491-
test_expect_failure 'blame with pathspec outside sparse definition' '
491+
test_expect_success 'blame with pathspec outside sparse definition' '
492492
init_repos &&
493493
494-
test_all_match git blame folder1/a &&
495-
test_all_match git blame folder2/a &&
496-
test_all_match git blame deep/deeper2/a &&
497-
test_all_match git blame deep/deeper2/deepest/a
494+
test_sparse_match git sparse-checkout set &&
495+
test_sparse_match test_must_fail git blame folder1/a &&
496+
test_sparse_match test_must_fail git blame folder2/a &&
497+
test_sparse_match test_must_fail git blame deep/deeper2/a &&
498+
test_sparse_match test_must_fail git blame deep/deeper2/deepest/a
498499
'
499500

500501
# TODO: This behaves correctly in microsoft/git. Why?

0 commit comments

Comments
 (0)