Skip to content

Commit 8d13caf

Browse files
committed
Merge branch 'ml/submodule'
* ml/submodule: git-submodule.sh - Remove trailing / from URL if found git-submodule.sh - Remove trailing / from URL if found
2 parents 88ab18d + 99b120a commit 8d13caf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-submodule.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ resolve_relative_url ()
3535
remoteurl=$(git config "remote.$remote.url") ||
3636
die "remote ($remote) does not have a url defined in .git/config"
3737
url="$1"
38+
remoteurl=${remoteurl%/}
3839
while test -n "$url"
3940
do
4041
case "$url" in
@@ -49,7 +50,7 @@ resolve_relative_url ()
4950
break;;
5051
esac
5152
done
52-
echo "$remoteurl/$url"
53+
echo "$remoteurl/${url%/}"
5354
}
5455

5556
#

0 commit comments

Comments
 (0)