summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorSilvan Mosberger <infinisil@icloud.com>2019-08-31 01:16:50 +0200
committerSilvan Mosberger <infinisil@icloud.com>2019-08-31 01:16:50 +0200
commit89636b9a5e233708db27afdafadbefd85457efb4 (patch)
tree8da4f969f64274c184462f3afb9afbf00291cd0e /pkgs/build-support/fetchgit
parent00762b57545dba3b3e21e3a649b574db3db36c65 (diff)
downloadnixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar.gz
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar.bz2
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar.lz
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar.xz
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.tar.zst
nixpkgs-89636b9a5e233708db27afdafadbefd85457efb4.zip
nix-prefetch-git: Remove some pack file non-determinism
Diffstat (limited to 'pkgs/build-support/fetchgit')
-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 b447911ab8d..931be1a3700 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
     )
 }