diff mbox series

[RFC,1/2] submodule tests: fix potentially broken "config .. --unset"

Message ID RFC-patch-1.2-a8e31e35392-20211117T113134Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series submodule: test what happens if submodule.superprojectGitDir isn't around | expand

Commit Message

Ævar Arnfjörð Bjarmason Nov. 17, 2021, 11:43 a.m. UTC
These "config ... --unset" at the start must be guarded by something
like a test_might_fail, or we'll fail if a previous test didn't run,
e.g. due to the --run option.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t7406-submodule-update.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index b42a339982b..01e1acaf300 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -1063,7 +1063,7 @@  test_expect_success 'submodule update --quiet passes quietness to fetch with a s
 
 test_expect_success 'submodule update adds superproject gitdir to older repos' '
 	(cd super &&
-	 git -C submodule config --unset submodule.superprojectGitdir &&
+	 test_might_fail git -C submodule config --unset submodule.superprojectGitdir &&
 	 git submodule update &&
 	 test-tool path-utils relative_path \
 		"$(git rev-parse --absolute-git-dir)" \
@@ -1075,7 +1075,7 @@  test_expect_success 'submodule update adds superproject gitdir to older repos' '
 
 test_expect_success 'submodule update uses config.worktree if applicable' '
 	(cd super &&
-	 git -C submodule config --unset submodule.superprojectGitDir &&
+	 test_might_fail git -C submodule config --unset submodule.superprojectGitDir &&
 	 git -C submodule config extensions.worktreeConfig true &&
 	 git submodule update &&
 	 test-tool path-utils relative_path \