Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb28
1 files changed, 20 insertions, 8 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index e38c7b516ee..70d072e8082 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -354,9 +354,13 @@ module Gitlab
end
end
- def new_commits(newrev)
+ def new_commits(newrevs)
wrapped_gitaly_errors do
- gitaly_ref_client.list_new_commits(newrev)
+ if Feature.enabled?(:list_commits)
+ gitaly_commit_client.list_commits(Array.wrap(newrevs) + %w[--not --all])
+ else
+ Array.wrap(newrevs).flat_map { |newrev| gitaly_ref_client.list_new_commits(newrev) }
+ end
end
end
@@ -370,6 +374,20 @@ module Gitlab
end
end
+ # List blobs reachable via a set of revisions. Supports the
+ # pseudo-revisions `--not` and `--all`. Uses the minimum of
+ # GitalyClient.medium_timeout and dynamic timeout if the dynamic
+ # timeout is set, otherwise it'll always use the medium timeout.
+ def blobs(revisions, dynamic_timeout: nil)
+ revisions = revisions.reject { |rev| rev.blank? || rev == ::Gitlab::Git::BLANK_SHA }
+
+ return [] if revisions.blank?
+
+ wrapped_gitaly_errors do
+ gitaly_blob_client.list_blobs(revisions, limit: REV_LIST_COMMIT_LIMIT, dynamic_timeout: dynamic_timeout)
+ end
+ end
+
def count_commits(options)
options = process_count_commits_options(options.dup)
@@ -869,12 +887,6 @@ module Gitlab
end
end
- def rebase_in_progress?(rebase_id)
- wrapped_gitaly_errors do
- gitaly_repository_client.rebase_in_progress?(rebase_id)
- end
- end
-
def squash(user, squash_id, start_sha:, end_sha:, author:, message:)
wrapped_gitaly_errors do
gitaly_operation_client.user_squash(user, squash_id, start_sha, end_sha, author, message)