Skip to content

Commit

Permalink
fetchgit: remove only .git
Browse files Browse the repository at this point in the history
Source of this change goes back to 2009 and original version of
fetchgit at 205fb0c.

The nondeterminism is really caused by changing .git so leave other
files alone as they might be interesting.

Note: this causes a hash mismatch with Hydra's version of Git Plugin
which we should fix to comply.
  • Loading branch information
domenkozar committed May 14, 2016
1 parent 25e3c09 commit 64a072e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/fetchgit/nix-prefetch-git
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ _clone_user_rev() {
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
if test -z "$leaveDotGit"; then
echo "removing \`.git'..." >&2
find "$dir" -name .git\* -print0 | xargs -0 rm -rf
find "$dir" -name .git -print0 | xargs -0 rm -rf
else
find "$dir" -name .git | while read gitdir; do
make_deterministic_repo "$(readlink -f "$gitdir/..")"
Expand Down

0 comments on commit 64a072e

Please sign in to comment.