fetchgit: adapt regex to git 2.18.0

authored by Guillaume Maudoux and committed by Will Dietz ea23a1ed 6f9a53c1

+1 -1
+1 -1
pkgs/build-support/fetchgit/nix-prefetch-git
··· 185 185 186 186 # checkout each submodule 187 187 hash=$(echo "$l" | awk '{print $1}' | tr -d '-') 188 - dir=$(echo "$l" | sed -n 's/^ \{0,1\}[^ ]* \(.*\) ([^ ]*)$/\1/p') 188 + dir=$(echo "$l" | sed -n 's/^.[0-9a-f]\+ \(.*[^)]*\)\( (.*)\)\?$/\1/p') 189 189 name=$( 190 190 git config -f .gitmodules --get-regexp submodule\..*\.path | 191 191 sed -n "s,^\(.*\)\.path $dir\$,\\1,p")