mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
Add a Git-based content-addressed tarball cache
GitArchiveInputScheme now streams tarballs into a Git repository. This deduplicates data a lot, e.g. when you're fetching different revisions of the Nixpkgs repo. It also warns if the tree hash returned by GitHub doesn't match the tree hash of the imported tarball.
This commit is contained in:
parent
a8fea5a54f
commit
b36857ac8d
5 changed files with 272 additions and 37 deletions
|
|
@ -104,4 +104,9 @@ std::map<std::string, std::string> attrsToQuery(const Attrs & attrs)
|
|||
return query;
|
||||
}
|
||||
|
||||
Hash getRevAttr(const Attrs & attrs, const std::string & name)
|
||||
{
|
||||
return Hash::parseAny(getStrAttr(attrs, name), htSHA1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue