aboutsummaryrefslogtreecommitdiffstats
path: root/t/t7420-submodule-set-url.sh
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <heftig@archlinux.org>2023-10-03 20:50:45 +0200
committerJunio C Hamano <gitster@pobox.com>2023-10-03 15:32:31 -0700
commit5fc880632d5e9ef6fd40a5ef9b5e01d61cdc320a (patch)
tree93b9684a7e45b50954379e1b14e1a598f8ec87db /t/t7420-submodule-set-url.sh
parentt7419: actually test the branch switching (diff)
downloadgit-5fc880632d5e9ef6fd40a5ef9b5e01d61cdc320a.tar.gz
git-5fc880632d5e9ef6fd40a5ef9b5e01d61cdc320a.zip
t7419, t7420: use test_cmp_config instead of grepping .gitmodules
We have a test function to verify config files. Use it as it's more precise. Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7420-submodule-set-url.sh')
-rwxr-xr-xt/t7420-submodule-set-url.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7420-submodule-set-url.sh b/t/t7420-submodule-set-url.sh
index d6bf62b3ac..aa63d806fe 100755
--- a/t/t7420-submodule-set-url.sh
+++ b/t/t7420-submodule-set-url.sh
@@ -49,7 +49,7 @@ test_expect_success 'test submodule set-url' '
cd super &&
test_must_fail git submodule update --remote &&
git submodule set-url submodule ../newsubmodule &&
- grep -F "url = ../newsubmodule" .gitmodules &&
+ test_cmp_config ../newsubmodule -f .gitmodules submodule.submodule.url &&
git submodule update --remote
) &&
git -C super/submodule show >actual &&