Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow narHash instead of treeHash when checking locked Git archive inputs #12

Open
wants to merge 1 commit into
base: lazy-trees
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libfetchers/github.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ struct GitArchiveInputScheme : InputScheme
bool isLocked(const Input & input) const override
{
/* Since we can't verify the integrity of the tarball from the
Git revision alone, we also require a Git tree hash for
Git revision alone, we also require a Git tree hash or NAR hash for
locking. */
return input.getRev().has_value() && getTreeHash(input).has_value();
return input.getRev().has_value() && (getTreeHash(input).has_value() || input.getNarHash().has_value());
}

std::optional<ExperimentalFeature> experimentalFeature() const override
Expand Down