From 7a64bb7f1c4acac583bec019b61e135f1e11b012 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Jul 2022 15:48:31 +0200 Subject: [PATCH] Rename Input::fetch() to fetchToStore() --- src/libexpr/primops/fetchMercurial.cc | 2 +- src/libexpr/primops/fetchTree.cc | 2 +- src/libfetchers/fetchers.cc | 2 +- src/libfetchers/fetchers.hh | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc index e8111298a..b638f6daa 100644 --- a/src/libexpr/primops/fetchMercurial.cc +++ b/src/libexpr/primops/fetchMercurial.cc @@ -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); diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index be0fa7425..1bbb0f507 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -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); diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index e505362b2..f17e4e85a 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -112,7 +112,7 @@ bool Input::contains(const Input & other) const return false; } -std::pair Input::fetch(ref store) const +std::pair Input::fetchToStore(ref store) const { if (!scheme) throw Error("cannot fetch unsupported input '%s'", attrsToJSON(toAttrs())); diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh index 8a5db244a..94135512b 100644 --- a/src/libfetchers/fetchers.hh +++ b/src/libfetchers/fetchers.hh @@ -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 fetch(ref store) const; + /* Fetch the entire input into the Nix store, returning the + location in the Nix store and the locked input. */ + std::pair fetchToStore(ref store) const; /* Return an InputAccessor that allows access to files in the input without copying it to the store. Also return a possibly