[PATCH 2/3] ensure that relative submodule url needs ./ or ../

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Even though a relative path can be without them the
documentation explicitely talks about them. Lets ensure
that behavior with a test.

Signed-off-by: Heiko Voigt <hvoigt@xxxxxxxxxx>
---
 t/t7400-submodule-basic.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 5397037..3c2afa6 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -506,6 +506,18 @@ test_expect_success 'set up for relative path tests' '
 	)
 '
 
+test_expect_success 'subrepo is NOT considered a relative path"' '
+	(
+		cd reltest &&
+		cp pristine-.git-config .git/config &&
+		cp pristine-.gitmodules .gitmodules &&
+		git config -f .gitmodules submodule.sub.url "subrepo" &&
+		git config remote.origin.url "$submodurl" &&
+		git submodule init &&
+		test "$(git config submodule.sub.url)" = subrepo
+	)
+'
+
 test_expect_success '../subrepo works with URL - ssh://hostname/repo' '
 	(
 		cd reltest &&
-- 
1.8.0.3.gaed4666

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]