1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-17 16:37:26 -04:00

Fetch Git LFS objects

This commit is contained in:
hacker1024 2024-01-31 11:06:15 +11:00 committed by GitHub
parent c1bd50a80d
commit 85019515d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -17,9 +17,11 @@
, pkg-config
, mdbook
, runtimeShellPackage
, unzip
, libpqxx
, top-git
, git-lfs
, mercurial
, darcs
, subversion
@ -185,6 +187,7 @@ stdenv.mkDerivation (finalAttrs: {
darcs
foreman
top-git
git-lfs
mercurial
subversion
breezy
@ -215,6 +218,8 @@ stdenv.mkDerivation (finalAttrs: {
unzip
git
top-git
git-lfs
runtimeShellPackage # For Git LFS: https://github.com/git-lfs/git-lfs/discussions/5196#discussioncomment-4221187
mercurial
darcs
gnused

View file

@ -148,7 +148,9 @@ sub fetchInput {
my $localBranch = _isHash($branch) ? "_hydra_tmp" : $branch;
$res = run(cmd => ["git", "fetch", "-fu", "origin", "+$branch:$localBranch"], dir => $clonePath,
timeout => $cfg->{timeout});
$res = run(cmd => ["git", "lfs", "fetch", "origin", $branch], dir => $clonePath, timeout => $cfg->{timeout}) unless $res->{status};
$res = run(cmd => ["git", "fetch", "-fu", "origin"], dir => $clonePath, timeout => $cfg->{timeout}) if $res->{status};
$res = run(cmd => ["git", "lfs", "fetch", "origin", "--all"], dir => $clonePath, timeout => $cfg->{timeout}) unless $res->{status};
die "error fetching latest change from git repo at `$uri':\n$res->{stderr}" if $res->{status};
# If deepClone is defined, then we look at the content of the repository