Skip to content

Commit

Permalink
fixup! t1092: test interesting sparse-checkout scenarios
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
ldennington committed Sep 27, 2021
1 parent 058b7a9 commit c10d236
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -486,15 +486,14 @@ test_expect_success 'blame with pathspec inside sparse definition' '
test_all_match git blame deep/deeper1/deepest/a
'

# TODO: blame currently does not support blaming files outside of the
# sparse definition. It complains that the file doesn't exist locally.
test_expect_failure 'blame with pathspec outside sparse definition' '
test_expect_success 'blame with pathspec outside sparse definition' '
init_repos &&
test_all_match git blame folder1/a &&
test_all_match git blame folder2/a &&
test_all_match git blame deep/deeper2/a &&
test_all_match git blame deep/deeper2/deepest/a
test_sparse_match git sparse-checkout set &&
test_sparse_match test_must_fail git blame folder1/a &&
test_sparse_match test_must_fail git blame folder2/a &&
test_sparse_match test_must_fail git blame deep/deeper2/a &&
test_sparse_match test_must_fail git blame deep/deeper2/deepest/a
'

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

0 comments on commit c10d236

Please sign in to comment.