mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nix-prefetch-git: Support $NIX_PREFETCH_GIT_LEAVE_DOT_GIT.
svn path=/nixpkgs/trunk/; revision=18442
This commit is contained in:
parent
3124661215
commit
39476057a2
@ -44,7 +44,11 @@ if test -z "$finalPath"; then
|
||||
fi
|
||||
# Allow doing additional processing before .git removal
|
||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
||||
find $tmpFile -name .git\* | xargs rm -rf
|
||||
if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1
|
||||
then
|
||||
echo "removing \`.git'..."
|
||||
rm -rf .git
|
||||
fi
|
||||
|
||||
# Compute the hash.
|
||||
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
|
||||
|
Loading…
Reference in New Issue
Block a user