diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-24 18:09:00 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-24 18:09:00 +0100 |
commit | 8518cebfceb36f3744c276cc8dbf432b1275f53f (patch) | |
tree | 35369f7e062925259668b991ee58b4b8ac286d01 /src/libfetchers/git.cc | |
parent | 3317866060bfb88e0113b5d6275d1ad0e3f74d8d (diff) |
libfetchers: Rename immutable -> locked
This is more consistent with flake terminology.
Diffstat (limited to 'src/libfetchers/git.cc')
-rw-r--r-- | src/libfetchers/git.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index c3f0f8c8f..7f65c1533 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -187,7 +187,7 @@ struct GitInputScheme : InputScheme if (submodules) cacheType += "-submodules"; if (allRefs) cacheType += "-all-refs"; - auto getImmutableAttrs = [&]() + auto getLockedAttrs = [&]() { return Attrs({ {"type", cacheType}, @@ -208,7 +208,7 @@ struct GitInputScheme : InputScheme }; if (input.getRev()) { - if (auto res = getCache()->lookup(store, getImmutableAttrs())) + if (auto res = getCache()->lookup(store, getLockedAttrs())) return makeResult(res->first, std::move(res->second)); } @@ -288,7 +288,7 @@ struct GitInputScheme : InputScheme if (!input.getRef()) input.attrs.insert_or_assign("ref", isLocal ? readHead(actualUrl) : "master"); - Attrs mutableAttrs({ + Attrs unlockedAttrs({ {"type", cacheType}, {"name", name}, {"url", actualUrl}, @@ -307,7 +307,7 @@ struct GitInputScheme : InputScheme } else { - if (auto res = getCache()->lookup(store, mutableAttrs)) { + if (auto res = getCache()->lookup(store, unlockedAttrs)) { auto rev2 = Hash::parseAny(getStrAttr(res->first, "rev"), htSHA1); if (!input.getRev() || input.getRev() == rev2) { input.attrs.insert_or_assign("rev", rev2.gitRev()); @@ -404,7 +404,7 @@ struct GitInputScheme : InputScheme /* Now that we know the ref, check again whether we have it in the store. */ - if (auto res = getCache()->lookup(store, getImmutableAttrs())) + if (auto res = getCache()->lookup(store, getLockedAttrs())) return makeResult(res->first, std::move(res->second)); Path tmpDir = createTempDir(); @@ -476,14 +476,14 @@ struct GitInputScheme : InputScheme if (!_input.getRev()) getCache()->add( store, - mutableAttrs, + unlockedAttrs, infoAttrs, storePath, false); getCache()->add( store, - getImmutableAttrs(), + getLockedAttrs(), infoAttrs, storePath, true); |