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 }