summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6096f1)
raw | patch | inline | side by side (parent: d6096f1)
author | Mark Levedahl <mlevedahl@gmail.com> | |
Sun, 24 Aug 2008 18:46:10 +0000 (14:46 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 24 Aug 2008 19:08:11 +0000 (12:08 -0700) |
Resolve_relative_url was using its own code for this function, but
this is duplication with the best result that this continues to work.
Replace with the common function provided by git-parse-remote.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
this is duplication with the best result that this continues to work.
Replace with the common function provided by git-parse-remote.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | patch | blob | history |
diff --git a/git-submodule.sh b/git-submodule.sh
index 2a3a197d1057dcc73570a9946d5e5d8d9bbcc959..59fe7b335c7f87f41810be3c3e2a3c5aa0d1d9b0 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
[--] [<path>...]|[foreach <command>]"
OPTIONS_SPEC=
. git-sh-setup
+. git-parse-remote
require_work_tree
command=
# 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_default_remote)
remoteurl=$(git config "remote.$remote.url") ||
die "remote ($remote) does not have a url defined in .git/config"
url="$1"