1
0
mirror of https://github.com/git/git.git synced 2024-11-20 13:54:45 +01:00

git-submodule.sh - Remove trailing / from URL if found

git clone does not complain if a trailing '/' is included in the origin
URL, but doing so causes resolution of a submodule's URL relative to the
superproject to fail. Regardless of whether git is changed to remove the
trailing / before recording the URL, we should avoid this issue in
submodule as existing repositories can have this problem.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Mark Levedahl 2008-08-19 22:18:23 -04:00 committed by Junio C Hamano
parent ea3594e041
commit 7c69561986

@ -35,7 +35,7 @@ resolve_relative_url ()
remote="${remote:-origin}"
remoteurl=$(git config "remote.$remote.url") ||
die "remote ($remote) does not have a url defined in .git/config"
url="$1"
url="${1%/}"
while test -n "$url"
do
case "$url" in