Mark content-addressable paths with references as experimental
This commit is contained in:
parent
e68736936a
commit
629b9b0049
|
@ -1013,8 +1013,11 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source,
|
|||
std::unique_ptr<AbstractHashSink> hashSink;
|
||||
if (info.ca == "")
|
||||
hashSink = std::make_unique<HashSink>(htSHA256);
|
||||
else
|
||||
else {
|
||||
if (!info.references.empty())
|
||||
settings.requireExperimentalFeature("ca-references");
|
||||
hashSink = std::make_unique<HashModuloSink>(htSHA256, storePathToHash(info.path));
|
||||
}
|
||||
|
||||
LambdaSource wrapperSource([&](unsigned char * data, size_t len) -> size_t {
|
||||
size_t n = source.read(data, len);
|
||||
|
|
|
@ -26,11 +26,13 @@ struct CmdHash : Command
|
|||
mkFlag()
|
||||
.longName("type")
|
||||
.mkHashTypeFlag(&ht);
|
||||
#if 0
|
||||
mkFlag()
|
||||
.longName("modulo")
|
||||
.description("compute hash modulo specified string")
|
||||
.labels({"modulus"})
|
||||
.dest(&modulus);
|
||||
#endif
|
||||
expectArgs("paths", &paths);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue