mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nix-prefetch-git: run single-threaded 'git repack'
Without this, the generated pack files are non-deterministic. I didn't notice this issue in my earlier testing, because my test repo had too few commits for the thread scheduling to take effect. (Test repo had about 10 commits.)
This commit is contained in:
parent
f891bc78d1
commit
96cacf01bf
@ -226,9 +226,10 @@ make_deterministic_repo(){
|
||||
fi
|
||||
done
|
||||
|
||||
# Do a full repack, for determinism.
|
||||
# Repack does not add unreferenced objects to a pack file.
|
||||
# Do a full repack. Must run single-threaded, or else we loose determinism.
|
||||
git config pack.threads 1
|
||||
git repack -A -d -f
|
||||
rm -f .git/config
|
||||
|
||||
# Garbage collect unreferenced objects.
|
||||
git gc --prune=all
|
||||
|
Loading…
Reference in New Issue
Block a user