When fetching a non-local git repo by ref (and no rev), don't consider unrelated
cached revs for the same repository.
This commit is contained in:
Andrew Brooks 2022-10-14 18:04:47 -05:00
parent c7059c9b24
commit a259084c50

View file

@ -485,6 +485,10 @@ struct GitInputScheme : InputScheme
} }
input.attrs.insert_or_assign("ref", *head); input.attrs.insert_or_assign("ref", *head);
unlockedAttrs.insert_or_assign("ref", *head); unlockedAttrs.insert_or_assign("ref", *head);
} else {
if (!input.getRev()) {
unlockedAttrs.insert_or_assign("ref", input.getRef().value());
}
} }
if (auto res = getCache()->lookup(store, unlockedAttrs)) { if (auto res = getCache()->lookup(store, unlockedAttrs)) {