mirror of
https://github.com/NixOS/nix
synced 2025-06-30 11:43:15 +02:00
Add Git object hashing to the store layer
Part of RFC 133 Extracted from our old IPFS branches. Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com> Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Florian Klink <flokli@flokli.de>
This commit is contained in:
parent
04836c73e5
commit
201551c937
27 changed files with 484 additions and 86 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "archive.hh"
|
||||
#include "derivations.hh"
|
||||
#include "args.hh"
|
||||
#include "git.hh"
|
||||
|
||||
namespace nix::daemon {
|
||||
|
||||
|
@ -443,13 +444,17 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
|||
TeeSource savedNARSource(from, saved);
|
||||
NullFileSystemObjectSink sink; /* just parse the NAR */
|
||||
parseDump(sink, savedNARSource);
|
||||
} else {
|
||||
} else if (method == FileIngestionMethod::Flat) {
|
||||
/* Incrementally parse the NAR file, stripping the
|
||||
metadata, and streaming the sole file we expect into
|
||||
`saved`. */
|
||||
RegularFileSink savedRegular { saved };
|
||||
parseDump(savedRegular, from);
|
||||
if (!savedRegular.regular) throw Error("regular file expected");
|
||||
} else {
|
||||
/* Should have validated above that no other file ingestion
|
||||
method was used. */
|
||||
assert(false);
|
||||
}
|
||||
});
|
||||
logger->startWork();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue