Apply @edolstra stylistic suggestions
Mostly removing useless comments and adding spaces before `&` Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
3b76f8f252
commit
c182aac98a
3 changed files with 4 additions and 5 deletions
|
@ -45,7 +45,6 @@ struct PluginFilesSetting : public BaseSetting<Paths>
|
||||||
void set(const std::string & str, bool append = false) override;
|
void set(const std::string & str, bool append = false) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* MakeError(MissingExperimentalFeature, Error); */
|
|
||||||
class MissingExperimentalFeature: public Error
|
class MissingExperimentalFeature: public Error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -789,19 +789,19 @@ std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStor
|
||||||
settings.requireExperimentalFeature("ca-derivations");
|
settings.requireExperimentalFeature("ca-derivations");
|
||||||
StorePathSet storePaths;
|
StorePathSet storePaths;
|
||||||
std::set<Realisation> realisations;
|
std::set<Realisation> realisations;
|
||||||
for (auto path : paths) {
|
for (auto & path : paths) {
|
||||||
storePaths.insert(path.path());
|
storePaths.insert(path.path());
|
||||||
if (auto realisation = std::get_if<Realisation>(&path.raw))
|
if (auto realisation = std::get_if<Realisation>(&path.raw))
|
||||||
realisations.insert(*realisation);
|
realisations.insert(*realisation);
|
||||||
}
|
}
|
||||||
auto pathsMap = copyPaths(srcStore, dstStore, storePaths, repair, checkSigs, substitute);
|
auto pathsMap = copyPaths(srcStore, dstStore, storePaths, repair, checkSigs, substitute);
|
||||||
try {
|
try {
|
||||||
for (auto& realisation : realisations) {
|
for (auto & realisation : realisations) {
|
||||||
dstStore->registerDrvOutput(realisation);
|
dstStore->registerDrvOutput(realisation);
|
||||||
}
|
}
|
||||||
} catch (MissingExperimentalFeature & e) {
|
} catch (MissingExperimentalFeature & e) {
|
||||||
// Don't fail if the remote doesn't support CA derivations is it might
|
// Don't fail if the remote doesn't support CA derivations is it might
|
||||||
// not be whithin our control to change that, and we might still want
|
// not be within our control to change that, and we might still want
|
||||||
// to at least copy the output paths.
|
// to at least copy the output paths.
|
||||||
if (e.missingFeature == "ca-derivations")
|
if (e.missingFeature == "ca-derivations")
|
||||||
ignoreException();
|
ignoreException();
|
||||||
|
|
|
@ -752,7 +752,7 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
|
||||||
that. Returns a map of what each path was copied to the dstStore
|
that. Returns a map of what each path was copied to the dstStore
|
||||||
as. */
|
as. */
|
||||||
std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStore,
|
std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStore,
|
||||||
const RealisedPath::Set&,
|
const RealisedPath::Set &,
|
||||||
RepairFlag repair = NoRepair,
|
RepairFlag repair = NoRepair,
|
||||||
CheckSigsFlag checkSigs = CheckSigs,
|
CheckSigsFlag checkSigs = CheckSigs,
|
||||||
SubstituteFlag substitute = NoSubstitute);
|
SubstituteFlag substitute = NoSubstitute);
|
||||||
|
|
Loading…
Reference in a new issue