mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
GitArchiveInputScheme: Require a NAR hash
This commit is contained in:
parent
071dd2b3a4
commit
09d76e512a
@ -282,7 +282,11 @@ struct GitArchiveInputScheme : InputScheme
|
||||
|
||||
bool isLocked(const Input & input) const override
|
||||
{
|
||||
return (bool) input.getRev();
|
||||
/* Since we can't verify the integrity of the tarball from the
|
||||
Git revision alone, we also require a NAR hash for
|
||||
locking. FIXME: in the future, we may want to require a Git
|
||||
tree hash instead of a NAR hash. */
|
||||
return input.getRev().has_value() && input.getNarHash().has_value();
|
||||
}
|
||||
|
||||
std::optional<ExperimentalFeature> experimentalFeature() const override
|
||||
|
Loading…
Reference in New Issue
Block a user