diff options
author | SharzyL <me@sharzy.in> | 2023-11-11 13:44:16 +0800 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-11-12 15:20:16 +0100 |
commit | b186e2d76ecdca77d80c4bf95f9026a9b50854f2 (patch) | |
tree | 2eb05987e35cfee5af26f23efaaaf511239cb037 /pkgs/build-support | |
parent | 2d221764a3cc2955d4db64233f82eaa40cbc8392 (diff) |
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.
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index ae3d28cc23194..a3ea0297673da 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -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" |