summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index b447911ab8d3..931be1a37007 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -265,7 +265,9 @@ make_deterministic_repo(){
rm -f .git/config
# Garbage collect unreferenced objects.
- git gc --prune=all
+ # Note: --keep-largest-pack prevents non-deterministic ordering of packs
+ # listed in .git/objects/info/packs by only using a single pack
+ git gc --prune=all --keep-largest-pack
)
}