summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-08-27 17:16:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-08-27 17:16:30 -0700
commit8d13caf795902812d44809e2f222fb2334030603 (patch)
tree6fb2e7360a8878ff675679d9492af2915f0cfc36
parentMerge branch 'am/cherry-pick-rerere' (diff)
parentgit-submodule.sh - Remove trailing / from URL if found (diff)
downloadtgif-8d13caf795902812d44809e2f222fb2334030603.tar.xz
Merge branch 'ml/submodule'
* ml/submodule: git-submodule.sh - Remove trailing / from URL if found git-submodule.sh - Remove trailing / from URL if found
-rwxr-xr-xgit-submodule.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 4a95035d85..1c39b593a6 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -35,6 +35,7 @@ resolve_relative_url ()
remoteurl=$(git config "remote.$remote.url") ||
die "remote ($remote) does not have a url defined in .git/config"
url="$1"
+ remoteurl=${remoteurl%/}
while test -n "$url"
do
case "$url" in
@@ -49,7 +50,7 @@ resolve_relative_url ()
break;;
esac
done
- echo "$remoteurl/$url"
+ echo "$remoteurl/${url%/}"
}
#