Merge pull request #5263 from greedy/fix-5261

Include subpath in flake fingerprint
This commit is contained in:
Eelco Dolstra
2021-09-17 08:10:47 +02:00
committed by GitHub
+2 -1
View File
@@ -710,8 +710,9 @@ Fingerprint LockedFlake::getFingerprint() const
// and we haven't changed it, then it's sufficient to use
// flake.sourceInfo.storePath for the fingerprint.
return hashString(htSHA256,
fmt("%s;%d;%d;%s",
fmt("%s;%s;%d;%d;%s",
flake.sourceInfo->storePath.to_string(),
flake.lockedRef.subdir,
flake.lockedRef.input.getRevCount().value_or(0),
flake.lockedRef.input.getLastModified().value_or(0),
lockFile));