mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Shrink diff in two places
Stuff crept in there.
This commit is contained in:
parent
adb3608034
commit
974a983351
2 changed files with 10 additions and 7 deletions
|
@ -17,8 +17,9 @@ std::string makeFileIngestionPrefix(FileIngestionMethod m)
|
||||||
return "";
|
return "";
|
||||||
case FileIngestionMethod::Recursive:
|
case FileIngestionMethod::Recursive:
|
||||||
return "r:";
|
return "r:";
|
||||||
|
default:
|
||||||
|
throw Error("impossible, caught both cases");
|
||||||
}
|
}
|
||||||
assert(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash)
|
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash)
|
||||||
|
|
|
@ -31,6 +31,7 @@ std::map<StorePath, StorePath> makeContentAddressed(
|
||||||
for (auto & ref : oldInfo->references) {
|
for (auto & ref : oldInfo->references) {
|
||||||
if (ref == path)
|
if (ref == path)
|
||||||
refs.self = true;
|
refs.self = true;
|
||||||
|
else {
|
||||||
auto i = remappings.find(ref);
|
auto i = remappings.find(ref);
|
||||||
auto replacement = i != remappings.end() ? i->second : ref;
|
auto replacement = i != remappings.end() ? i->second : ref;
|
||||||
// FIXME: warn about unremapped paths?
|
// FIXME: warn about unremapped paths?
|
||||||
|
@ -39,6 +40,7 @@ std::map<StorePath, StorePath> makeContentAddressed(
|
||||||
refs.others.insert(std::move(replacement));
|
refs.others.insert(std::move(replacement));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sink.s = rewriteStrings(sink.s, rewrites);
|
sink.s = rewriteStrings(sink.s, rewrites);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue