1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-18 17:02:28 -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 , pkg-config
, mdbook , mdbook
, runtimeShellPackage
, unzip , unzip
, libpqxx , libpqxx
, top-git , top-git
, git-lfs
, mercurial , mercurial
, darcs , darcs
, subversion , subversion
@ -185,6 +187,7 @@ stdenv.mkDerivation (finalAttrs: {
darcs darcs
foreman foreman
top-git top-git
git-lfs
mercurial mercurial
subversion subversion
breezy breezy
@ -215,6 +218,8 @@ stdenv.mkDerivation (finalAttrs: {
unzip unzip
git git
top-git top-git
git-lfs
runtimeShellPackage # For Git LFS: https://github.com/git-lfs/git-lfs/discussions/5196#discussioncomment-4221187
mercurial mercurial
darcs darcs
gnused gnused

View file

@ -148,7 +148,9 @@ sub fetchInput {
my $localBranch = _isHash($branch) ? "_hydra_tmp" : $branch; my $localBranch = _isHash($branch) ? "_hydra_tmp" : $branch;
$res = run(cmd => ["git", "fetch", "-fu", "origin", "+$branch:$localBranch"], dir => $clonePath, $res = run(cmd => ["git", "fetch", "-fu", "origin", "+$branch:$localBranch"], dir => $clonePath,
timeout => $cfg->{timeout}); 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", "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}; 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 # If deepClone is defined, then we look at the content of the repository