fetchgit: Simplify submodule url discovery
This commit is contained in:
parent
d2a2c77643
commit
4fcbe096b6
@ -151,12 +151,7 @@ init_submodules(){
|
|||||||
local name=$(
|
local name=$(
|
||||||
git config -f .gitmodules --get-regexp submodule\..*\.path |
|
git config -f .gitmodules --get-regexp submodule\..*\.path |
|
||||||
sed -n "s,^\(.*\)\.path $dir\$,\\1,p")
|
sed -n "s,^\(.*\)\.path $dir\$,\\1,p")
|
||||||
local url=$(git config -f .gitmodules --get ${name}.url)
|
local url=$(git config --get ${name}.url)
|
||||||
|
|
||||||
# Get Absolute URL if we have a relative URL
|
|
||||||
if ! echo "$url" | grep '^[a-zA-Z]\+://' >/dev/null 2>&1; then
|
|
||||||
url="$(git config --get remote.origin.url)/$url"
|
|
||||||
fi
|
|
||||||
|
|
||||||
clone "$dir" "$url" "$hash" ""
|
clone "$dir" "$url" "$hash" ""
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user