diff options
-rwxr-xr-x | git-submodule.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index e4c31fb7db..46d75aba31 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -35,7 +35,8 @@ 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" + remoteurl=${remoteurl%/} while test -n "$url" do case "$url" in @@ -50,7 +51,7 @@ resolve_relative_url () break;; esac done - echo "$remoteurl/$url" + echo "$remoteurl/${url%/}" } # |