From 4fcbe096b6eebb9b38d457a9afdb2950ae93df4c Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 4 Dec 2014 15:17:52 -0800 Subject: fetchgit: Simplify submodule url discovery --- pkgs/build-support/fetchgit/nix-prefetch-git | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'pkgs') diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 8a427d56ba36..01605b35ef32 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -151,12 +151,7 @@ init_submodules(){ local name=$( git config -f .gitmodules --get-regexp submodule\..*\.path | sed -n "s,^\(.*\)\.path $dir\$,\\1,p") - local url=$(git config -f .gitmodules --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 + local url=$(git config --get ${name}.url) clone "$dir" "$url" "$hash" "" done -- cgit 1.4.1