mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
naive lfs support
This commit is contained in:
parent
587c7dcb2b
commit
8fb36a98ff
3 changed files with 23 additions and 0 deletions
|
@ -318,6 +318,8 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
|
|||
|
||||
std::vector<std::tuple<Submodule, Hash>> getSubmodules(const Hash & rev, bool exportIgnore) override;
|
||||
|
||||
void smudgeLfs() override;
|
||||
|
||||
std::string resolveSubmoduleUrl(
|
||||
const std::string & url,
|
||||
const std::string & base) override
|
||||
|
@ -1007,6 +1009,15 @@ std::vector<std::tuple<GitRepoImpl::Submodule, Hash>> GitRepoImpl::getSubmodules
|
|||
return result;
|
||||
}
|
||||
|
||||
void GitRepoImpl::smudgeLfs() {
|
||||
runProgram(RunOptions{
|
||||
.program = "git",
|
||||
.searchPath = true,
|
||||
.args = { "lfs", "pull" },
|
||||
.chdir = std::make_optional(this->path)
|
||||
});
|
||||
}
|
||||
|
||||
ref<GitRepo> getTarballCache()
|
||||
{
|
||||
static auto repoDir = std::filesystem::path(getCacheDir()) / "nix" / "tarball-cache";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue