mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nix-prefetch-git: make it quiet
Some programs (e.g. nvfetcher) parse the output of nix-prefetch-git as JSON. However, there is a pushd/popd command in nix-prefetch-git that outputs the directory name, breaking the structure of the result JSON. We suppressed it with `>/dev/null`. Passingly fixes a mixuse of tab and spaces.
This commit is contained in:
parent
2d221764a3
commit
b186e2d76e
@ -261,14 +261,14 @@ make_deterministic_repo(){
|
||||
# Remove files that contain timestamps or otherwise have non-deterministic
|
||||
# properties.
|
||||
if [ -f .git ]; then
|
||||
local dotgit_content=$(<.git)
|
||||
local dotgit_dir="${dotgit_content#gitdir: }"
|
||||
local dotgit_content=$(<.git)
|
||||
local dotgit_dir="${dotgit_content#gitdir: }"
|
||||
else
|
||||
local dotgit_dir=".git"
|
||||
local dotgit_dir=".git"
|
||||
fi
|
||||
pushd "$dotgit_dir"
|
||||
pushd "$dotgit_dir" >/dev/null
|
||||
rm -rf logs/ hooks/ index FETCH_HEAD ORIG_HEAD refs/remotes/origin/HEAD config
|
||||
popd
|
||||
popd >/dev/null
|
||||
# Remove all remote branches.
|
||||
git branch -r | while read -r branch; do
|
||||
clean_git branch -rD "$branch"
|
||||
|
Loading…
Reference in New Issue
Block a user