summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index bd1d8b5c1af..4ddf8a4cb9f 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -226,6 +226,9 @@ clone_user_rev() {
     if test -z "$leaveDotGit"; then
 	echo "removing \`.git'..." >&2
         find $dir -name .git\* | xargs rm -rf
+    else
+        # The logs and index contain timestamps
+        find $dir -name .git | xargs -I {} rm -rf {}/logs {}/index
     fi
 }