Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-05-16 05:26:46 +0300
committerJunio C Hamano <gitster@pobox.com>2023-05-16 19:14:23 +0300
commitb126b65b3381cd8659552b39699b3b3d9a4f5393 (patch)
tree2f36757bff91eb3262b5e017dcdf12588cfa810c /t/lib-submodule-update.sh
parenteab648d2b4c1ca6fbc28de454b51d7d00f5a3e60 (diff)
test: do not negate test_path_is_* to assert absense
These tests use "! test_path_is_dir" or "! test_path_is_file" to ensure that the path is not recursively checked out or "submodule update" did not touch the working tree. Use "test_path_is_missing" to assert that the path does not exist, instead of negating test_path_is_* helpers; they are designed to be loud in wrong occasions. Besides, negating "test_path_is_dir" would mean we would be happy if a file exists there, which is not the case for these tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-submodule-update.sh')
-rw-r--r--t/lib-submodule-update.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index dee14992c5..9acb0d5d19 100644
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -802,7 +802,7 @@ test_submodule_recursing_with_args_common () {
git branch -t no_submodule origin/no_submodule &&
$command no_submodule &&
test_superproject_content origin/no_submodule &&
- ! test_path_is_dir sub1 &&
+ test_path_is_missing sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree &&
test_must_fail git config -f .git/modules/sub1/modules/sub2/config core.worktree
)