Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2008-08-20 06:18:23 +0400
committerJunio C Hamano <gitster@pobox.com>2008-08-21 10:18:53 +0400
commit7c695619868d0b867c87b0bb83303e058e010ac5 (patch)
treeb9b8526456dc897eb435e5db5c13e01e90fe10f8 /git-submodule.sh
parentea3594e04184475226109a21e71c539ff5f139fd (diff)
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index b40f876a2c..e4c31fb7db 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -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