Merge pull request #15469 from NixOS/fetchgit

fetchgit: remove only .git folder
This commit is contained in:
Eelco Dolstra 2016-05-16 16:44:55 +02:00
commit a5fa7c25cb

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