diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-05-21 13:26:07 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-05-21 13:26:31 +0000 |
commit | db3b13c0a9dad7f464741bb23e011cdb67650672 (patch) | |
tree | 0dbb69aad3ecf4e2e5b3adf0ec4eb80495df78ed /jenkins-helpers.sh | |
parent | 4b5f1d38014aa057ff813541919b0d5fd5faef41 (diff) |
jenkins-helpers.sh: Explicitly delete .git/gc.log
Turns out that "--prune=all" is not enough to get rid of
.git/gc.log. This file prevents "git gc", so remove it.
Change-Id: I74c3cd96fca19ef9718506e585df71339f4523e7
Diffstat (limited to 'jenkins-helpers.sh')
-rw-r--r-- | jenkins-helpers.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index ed8d3cb6..289ef75b 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -457,7 +457,8 @@ clone_or_update_repo_no_checkout () # between concurrent builds. # # Also, prune all loose objects to avoid "git gc --auto" failing - # and creating .git/gc.log, which will stop future "git gc --auto" runs. + # and creating .git/gc.log to warn us. + rm -f "$dir/.git/gc.log" git -C "$dir" gc --auto --force --prune=all # Delete stale locks -- especially .git/refs/remotes/REMOTE/BRANCH.lock # These occur when builds are aborted during "git remote update" or similar. |