From 39476057a2a6566103029d37929c6bcb32d96605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 16:39:06 +0000 Subject: [PATCH] nix-prefetch-git: Support $NIX_PREFETCH_GIT_LEAVE_DOT_GIT. svn path=/nixpkgs/trunk/; revision=18442 --- pkgs/build-support/fetchgit/nix-prefetch-git | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 88d2421003bc..3983ab28a2c7 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -44,7 +44,11 @@ if test -z "$finalPath"; then fi # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" - find $tmpFile -name .git\* | xargs rm -rf + if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1 + then + echo "removing \`.git'..." + rm -rf .git + fi # Compute the hash. hash=$(nix-hash --type $hashType $hashFormat $tmpFile)