diff options
author | Stan Hu <stanhu@gmail.com> | 2018-03-30 02:10:43 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-04-06 18:17:07 +0300 |
commit | a18eea8c32381b9514083e796a8504fdfc2c81d9 (patch) | |
tree | 85643264b363a582baf884d2df518450323d13aa /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 44f4a674e2a87d104f700265d835aba000c589f0 (diff) |
Automatically cleanup stale worktrees and lock files upon a push
git 2.16 will fail badly if there are stale worktrees.
Closes #44115
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index e1bc2f9ab61..b5a734aaef6 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -19,6 +19,11 @@ module Gitlab response.exists end + def cleanup + request = Gitaly::CleanupRequest.new(repository: @gitaly_repo) + GitalyClient.call(@storage, :repository_service, :cleanup, request) + end + def garbage_collect(create_bitmap) request = Gitaly::GarbageCollectRequest.new(repository: @gitaly_repo, create_bitmap: create_bitmap) GitalyClient.call(@storage, :repository_service, :garbage_collect, request) |