From c10d2363c0614cbeaf910010e9836973017b7da3 Mon Sep 17 00:00:00 2001 From: Lessley Dennington Date: Sun, 26 Sep 2021 22:12:29 -0700 Subject: [PATCH] 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). --- t/t1092-sparse-checkout-compatibility.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh index 1b030da176c0a1..cfc31fdcc20902 100755 --- a/t/t1092-sparse-checkout-compatibility.sh +++ b/t/t1092-sparse-checkout-compatibility.sh @@ -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?