1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 13:31:48 +02:00

naive lfs support

This commit is contained in:
Brian Camacho 2024-03-04 14:21:02 -08:00 committed by Brian Camacho
parent 587c7dcb2b
commit 8fb36a98ff
3 changed files with 23 additions and 0 deletions

View file

@ -381,6 +381,11 @@ struct GitInputScheme : InputScheme
return maybeGetBoolAttr(input.attrs, "submodules").value_or(false);
}
bool getLfsAttr(const Input & input) const
{
return maybeGetBoolAttr(input.attrs, "lfs").value_or(false);
}
bool getExportIgnoreAttr(const Input & input) const
{
return maybeGetBoolAttr(input.attrs, "exportIgnore").value_or(false);
@ -648,6 +653,11 @@ struct GitInputScheme : InputScheme
}
}
if (getLfsAttr(input)) {
// urlencoded `?lfs=1` param is set,
repo->smudgeLfs();
}
assert(!origRev || origRev == rev);
if (!getShallowAttr(input))
input.attrs.insert_or_assign("revCount", getIntAttr(infoAttrs, "revCount"));