summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorTim Cuthbertson <tim@gfxmonk.net>2015-12-13 11:27:03 +1100
committerTim Cuthbertson <tim@gfxmonk.net>2016-02-27 16:56:38 +1100
commit456cbb29d9ba0cd518e82d2c2dc68e665629595e (patch)
tree818aa90c52e6eb7be874daf541c6a7cecd1f14bb /pkgs/build-support/fetchgit
parent96425dfa09a7a5ec4556a4a23102c481c72f5a4e (diff)
downloadnixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar.gz
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar.bz2
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar.lz
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar.xz
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.tar.zst
nixpkgs-456cbb29d9ba0cd518e82d2c2dc68e665629595e.zip
nix-prefetch-git: add --quiet flag and minor cleanup
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 97096aa2980..f81b896e33b 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -52,6 +52,7 @@ for arg; do
             --hash) argfun=set_hashType;;
             --branch-name) argfun=set_branchName;;
             --deepClone) deepClone=true;;
+            --quiet) QUIET=true;;
             --no-deepClone) deepClone=false;;
             --leave-dotGit) leaveDotGit=true;;
             --fetch-submodules) fetchSubmodules=true;;
@@ -281,9 +282,9 @@ clone_user_rev() {
     eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
     if test -z "$leaveDotGit"; then
         echo "removing \`.git'..." >&2
-        find $dir -name .git\* | xargs rm -rf
+        find "$dir" -name .git\* -print0 | xargs -0 rm -rf
     else
-        find $dir -name .git | while read gitdir; do
+        find "$dir" -name .git | while read gitdir; do
             make_deterministic_repo "$(readlink -f "$gitdir/..")"
         done
     fi