From 5b8007fdc4bc6cd1931b809f1b287441cd30ce60 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Tue, 19 Nov 2024 04:58:44 +0100 Subject: [PATCH 1/4] Update BaseRepo.pm --- lib/ES/BaseRepo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ES/BaseRepo.pm b/lib/ES/BaseRepo.pm index 63e6a9fb0a5c8..7d261b900811d 100644 --- a/lib/ES/BaseRepo.pm +++ b/lib/ES/BaseRepo.pm @@ -46,7 +46,7 @@ sub update_from_remote { unless ( $self->_try_to_fetch ) { my $url = $self->url; printf(" - %20s: Cloning from <%s>\n", $name, $url); - run 'git', 'clone', '--bare', $self->_reference_args, $url, $git_dir; + run 'git', 'clone', '--bare', '--no-tags', '--depth=1', $self->_reference_args, $url, $git_dir; } 1; } From 85036459fcf71596c3646ad61eab8c6fe3e5e9d1 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Tue, 19 Nov 2024 05:12:07 +0100 Subject: [PATCH 2/4] Update TargetRepo.pm --- lib/ES/TargetRepo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ES/TargetRepo.pm b/lib/ES/TargetRepo.pm index c1514ab00967c..5feb4459440d9 100644 --- a/lib/ES/TargetRepo.pm +++ b/lib/ES/TargetRepo.pm @@ -48,7 +48,7 @@ sub checkout_minimal { my $original_pwd = Cwd::cwd(); eval { - my $out = run qw(git clone --no-checkout), + my $out = run qw(git clone --no-checkout --no-tags --depth=1), $self->git_dir, $self->{destination}; # This if statement handles empty repositories in a way that works with From 2f69c90bd5890964f2a687d64985b1ceed370e0b Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Tue, 19 Nov 2024 05:23:29 +0100 Subject: [PATCH 3/4] Update Repo.pm --- lib/ES/Repo.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ES/Repo.pm b/lib/ES/Repo.pm index 7d81531dac816..f0843f28e1788 100644 --- a/lib/ES/Repo.pm +++ b/lib/ES/Repo.pm @@ -277,6 +277,7 @@ sub _extract_from_ref { $dest->mkpath; my $tar = $dest->file( '.temp_git_archive.tar' ); die "File <$tar> already exists" if -e $tar; + run qw(git fetch --no-tags --depth=1), $ref . ':' . $ref; run qw(git archive --format=tar -o), $tar, $ref, $path; run qw(tar -x -C), $dest, '-f', $tar; From 91472430ea0da4c338adc8ddd9be61925cc93727 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Tue, 19 Nov 2024 05:35:02 +0100 Subject: [PATCH 4/4] Update Repo.pm --- lib/ES/Repo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ES/Repo.pm b/lib/ES/Repo.pm index f0843f28e1788..6a7ac979c4f7c 100644 --- a/lib/ES/Repo.pm +++ b/lib/ES/Repo.pm @@ -277,7 +277,7 @@ sub _extract_from_ref { $dest->mkpath; my $tar = $dest->file( '.temp_git_archive.tar' ); die "File <$tar> already exists" if -e $tar; - run qw(git fetch --no-tags --depth=1), $ref . ':' . $ref; + run qw(git fetch --no-tags --depth=1 origin), $ref . ':' . $ref; run qw(git archive --format=tar -o), $tar, $ref, $path; run qw(tar -x -C), $dest, '-f', $tar;