From 9be9eff3ba2669c186eccbbf5bb06b704766aa48 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Thu, 17 Jan 2019 01:02:02 +0000 Subject: jenkins-helpers.sh: Fix "git gc" in clone_or_update_repo Change-Id: I8f4711912ebf18504ae7cad79c755e482610f840 --- jenkins-helpers.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index 95962efd..9bf6f69e 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -386,7 +386,10 @@ clone_or_update_repo_no_checkout () # a lock. Use --force to workaround that. It should be safe # to override the lock since directories should not be shared # between concurrent builds. - git -C "$dir" gc --auto --force + # + # Also, prune all loose objects to avoid "git gc --auto" failing + # and creating .git/gc.log, which will stop future "git gc --auto" runs. + git -C "$dir" gc --auto --force --prune=all fi ( -- cgit v1.2.3