mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
SHA-256 is Git's next hash algorithm. The world is still basically stuck on SHA-1 with git, but shouldn't be. We can at least do our part to get ready. On the C++ implementation side, only a little bit of generalization was needed, and that was fairly straight-forward. The tests (unit and system) were actually bigger, and care was taken to make sure they were all cover both algorithms equally.
12 lines
257 B
Bash
Executable file
12 lines
257 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source common.sh
|
|
|
|
# Store layer needs bugfix
|
|
requireDaemonNewerThan "2.27pre20250122"
|
|
|
|
nix-build ../fixed.nix -A git-sha1 --no-out-link
|
|
|
|
if isDaemonNewer "2.31pre20250724"; then
|
|
nix-build ../fixed.nix -A git-sha256 --no-out-link
|
|
fi
|