summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-12-04 15:17:52 -0800
committerWilliam A. Kennington III <william@wkennington.com>2014-12-04 15:17:58 -0800
commit4fcbe096b6eebb9b38d457a9afdb2950ae93df4c (patch)
treeaefa6242f9a85175f4a9e0fd637612054b36d207 /pkgs
parentd2a2c776433d523704855acb862c70d28c5a0855 (diff)
downloadnixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar.gz
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar.bz2
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar.lz
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar.xz
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.tar.zst
nixlib-4fcbe096b6eebb9b38d457a9afdb2950ae93df4c.zip
fetchgit: Simplify submodule url discovery
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git7
1 files changed, 1 insertions, 6 deletions
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