This change removes replaces the remote finding logic in resolve_relative_url with the new get_remote function. Signed-off-by: David Aguilar <davvid@xxxxxxxxx> --- git-submodule.sh | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 9d2bddb..d2ae835 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -39,9 +39,7 @@ get_remote() # Resolve relative url by appending to parent's url resolve_relative_url () { - branch="$(git symbolic-ref HEAD 2>/dev/null)" - remote="$(git config branch.${branch#refs/heads/}.remote)" - remote="${remote:-origin}" + remote=$(get_remote) remoteurl=$(git config "remote.$remote.url") || die "remote ($remote) does not have a url defined in .git/config" url="$1" -- 1.6.0.90.g436ed -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html