Shrink diff in two places
Stuff crept in there.
This commit is contained in:
@@ -17,8 +17,9 @@ std::string makeFileIngestionPrefix(FileIngestionMethod m)
|
||||
return "";
|
||||
case FileIngestionMethod::Recursive:
|
||||
return "r:";
|
||||
default:
|
||||
throw Error("impossible, caught both cases");
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash)
|
||||
|
||||
@@ -31,12 +31,14 @@ std::map<StorePath, StorePath> makeContentAddressed(
|
||||
for (auto & ref : oldInfo->references) {
|
||||
if (ref == path)
|
||||
refs.self = true;
|
||||
auto i = remappings.find(ref);
|
||||
auto replacement = i != remappings.end() ? i->second : ref;
|
||||
// FIXME: warn about unremapped paths?
|
||||
if (replacement != ref) {
|
||||
rewrites.insert_or_assign(srcStore.printStorePath(ref), srcStore.printStorePath(replacement));
|
||||
refs.others.insert(std::move(replacement));
|
||||
else {
|
||||
auto i = remappings.find(ref);
|
||||
auto replacement = i != remappings.end() ? i->second : ref;
|
||||
// FIXME: warn about unremapped paths?
|
||||
if (replacement != ref) {
|
||||
rewrites.insert_or_assign(srcStore.printStorePath(ref), srcStore.printStorePath(replacement));
|
||||
refs.others.insert(std::move(replacement));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user