mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
nix-prefetch-git: add --quiet flag and minor cleanup
This commit is contained in:
parent
96425dfa09
commit
456cbb29d9
@ -52,6 +52,7 @@ for arg; do
|
|||||||
--hash) argfun=set_hashType;;
|
--hash) argfun=set_hashType;;
|
||||||
--branch-name) argfun=set_branchName;;
|
--branch-name) argfun=set_branchName;;
|
||||||
--deepClone) deepClone=true;;
|
--deepClone) deepClone=true;;
|
||||||
|
--quiet) QUIET=true;;
|
||||||
--no-deepClone) deepClone=false;;
|
--no-deepClone) deepClone=false;;
|
||||||
--leave-dotGit) leaveDotGit=true;;
|
--leave-dotGit) leaveDotGit=true;;
|
||||||
--fetch-submodules) fetchSubmodules=true;;
|
--fetch-submodules) fetchSubmodules=true;;
|
||||||
@ -281,9 +282,9 @@ clone_user_rev() {
|
|||||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
||||||
if test -z "$leaveDotGit"; then
|
if test -z "$leaveDotGit"; then
|
||||||
echo "removing \`.git'..." >&2
|
echo "removing \`.git'..." >&2
|
||||||
find $dir -name .git\* | xargs rm -rf
|
find "$dir" -name .git\* -print0 | xargs -0 rm -rf
|
||||||
else
|
else
|
||||||
find $dir -name .git | while read gitdir; do
|
find "$dir" -name .git | while read gitdir; do
|
||||||
make_deterministic_repo "$(readlink -f "$gitdir/..")"
|
make_deterministic_repo "$(readlink -f "$gitdir/..")"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user