From 375b7761741f4a42eeb3ff3bdef192abec24bb59 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 2 Dec 2012 10:25:01 -0500 Subject: [PATCH] t7400: Test submodule's configured remote URL Note that relative repository arguments passed to $ git submodule add [] are expanded relative to the superproject's remote URL, not relative to the current working directory, which is why /foo/ shows up in the configured URLs. Signed-off-by: W. Trevor King --- t/t7400-submodule-basic.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index ee119adf5..0b9a2612e 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -661,7 +661,8 @@ test_expect_success '../bar/a/b/c works with relative local path - ../foo/bar.gi git config remote.origin.url ../foo/bar.git && git submodule add ../bar/a/b/c ./a/b/c && git submodule init && - test "$(git config submodule.a/b/c.url)" = ../foo/bar/a/b/c + test "$(git config submodule.a/b/c.url)" = ../foo/bar/a/b/c && + test "$(cd a/b/c && git config remote.origin.url)" = ../../../../foo/bar/a/b/c ) ' -- 2.26.2