diff options
author | Georges Dubus <georges.dubus@compiletoi.net> | 2014-07-27 19:13:00 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-08-08 21:51:29 +0200 |
commit | f4fbcddd4484c24df5dde813dc8679a0c0c7cdd8 (patch) | |
tree | 68673e57111230f22580df074c41178d33131bf9 /pkgs/build-support/fetchgit/nix-prefetch-git | |
parent | 34732ba2087e7fe125c3c19edde8fbc7b9567776 (diff) |
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.
Diffstat (limited to 'pkgs/build-support/fetchgit/nix-prefetch-git')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 3 |
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 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 } |