diff options
Diffstat (limited to 'jenkins-helpers.sh')
-rw-r--r-- | jenkins-helpers.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index 83f4aee4..cab20f21 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -382,7 +382,11 @@ clone_or_update_repo_no_checkout () else # Clean up the clone (this is supposed to re-share objects from # reference clone and keep the size of the clone minimal). - git -C "$dir" gc + # It's possible that previous GC process was interrupted and left + # 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 --force fi ( |