From f4fbcddd4484c24df5dde813dc8679a0c0c7cdd8 Mon Sep 17 00:00:00 2001 From: Georges Dubus <georges.dubus@compiletoi.net> Date: Sun, 27 Jul 2014 19:13:00 +0200 Subject: [PATCH] fetchgit: make deterministic with leaveDotGit (close #3392) There was a few files containing timestamp, so we now remove them. It shouldn't be a problem for logs. However, index might be. Anyway, that's better than nothing. --- pkgs/build-support/fetchgit/nix-prefetch-git | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index bd1d8b5c1af0..4ddf8a4cb9f3 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 }