Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch Git LFS objects #1355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
, pkg-config
, mdbook

, runtimeShellPackage
, unzip
, libpqxx
, top-git
, git-lfs
, mercurial
, darcs
, subversion
Expand Down Expand Up @@ -185,6 +187,7 @@ stdenv.mkDerivation (finalAttrs: {
darcs
foreman
top-git
git-lfs
mercurial
subversion
breezy
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Hydra/Plugin/GitInput.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading