Rename Input::fetch() to fetchToStore()

This commit is contained in:
Eelco Dolstra 2022-07-25 15:48:31 +02:00
parent a3427a1478
commit 7a64bb7f1c
4 changed files with 6 additions and 6 deletions

View file

@ -68,7 +68,7 @@ static void prim_fetchMercurial(EvalState & state, const PosIdx pos, Value * * a
auto input = fetchers::Input::fromAttrs(std::move(attrs));
// FIXME: use name
auto [storePath, input2] = input.fetch(state.store);
auto [storePath, input2] = input.fetchToStore(state.store);
auto attrs2 = state.buildBindings(8);
auto storePath2 = state.store->printStorePath(storePath);

View file

@ -196,7 +196,7 @@ static void fetchTree(
params.emptyRevFallback,
false);
} else {
auto [storePath, input2] = input.fetch(state.store);
auto [storePath, input2] = input.fetchToStore(state.store);
auto storePath2 = state.store->printStorePath(storePath);

View file

@ -112,7 +112,7 @@ bool Input::contains(const Input & other) const
return false;
}
std::pair<StorePath, Input> Input::fetch(ref<Store> store) const
std::pair<StorePath, Input> Input::fetchToStore(ref<Store> store) const
{
if (!scheme)
throw Error("cannot fetch unsupported input '%s'", attrsToJSON(toAttrs()));

View file

@ -62,9 +62,9 @@ public:
bool contains(const Input & other) const;
/* Fetch the input into the Nix store, returning the location in
the Nix store and the locked input. */
std::pair<StorePath, Input> fetch(ref<Store> store) const;
/* Fetch the entire input into the Nix store, returning the
location in the Nix store and the locked input. */
std::pair<StorePath, Input> fetchToStore(ref<Store> store) const;
/* Return an InputAccessor that allows access to files in the
input without copying it to the store. Also return a possibly