fetchgit: remove only .git

Source of this change goes back to 2009 and original version of
fetchgit at 205fb0c87e.

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.
This commit is contained in:
Domen Kožar 2016-05-15 00:24:04 +01:00
parent 25e3c091a0
commit 64a072e357

View File

@ -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/..")"