diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-17 01:02:02 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-17 01:03:34 +0000 |
commit | 9be9eff3ba2669c186eccbbf5bb06b704766aa48 (patch) | |
tree | e8cb01f6621da00e10cdfeecc2ae189924226fec | |
parent | 7b1b1b0841224759b37750abaa5c784f9dfd6437 (diff) |
jenkins-helpers.sh: Fix "git gc" in clone_or_update_repo
Change-Id: I8f4711912ebf18504ae7cad79c755e482610f840
-rw-r--r-- | jenkins-helpers.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 ( |