summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/repository.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2018-02-07 18:26:35 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-02-21 17:35:31 -0300
commitacc0e25de739aa515dbf8ef151921f366fe322b1 (patch)
tree98b2c8f79c0864f2d9f266556929a02b9a5eda9f /lib/gitlab/git/repository.rb
parentb2761d17716878e104b596161370780f9c035c25 (diff)
downloadgitlab-ce-acc0e25de739aa515dbf8ef151921f366fe322b1.tar.gz
Incorporate Gitaly's RepositoryService.IsSquashInProgress RPCce-gitaly-squash-in-progress
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 6761fb0937a..14e98e39394 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -1234,7 +1234,13 @@ module Gitlab
end
def squash_in_progress?(squash_id)
- fresh_worktree?(worktree_path(SQUASH_WORKTREE_PREFIX, squash_id))
+ gitaly_migrate(:squash_in_progress) do |is_enabled|
+ if is_enabled
+ gitaly_repository_client.squash_in_progress?(squash_id)
+ else
+ fresh_worktree?(worktree_path(SQUASH_WORKTREE_PREFIX, squash_id))
+ end
+ end
end
def push_remote_branches(remote_name, branch_names, forced: true)