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.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index d27f721bb2c..dfbf8292f54 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -763,6 +763,20 @@ module Gitlab
BatchedGitRefUpdates::Deletion.bulk_insert!(records)
end
+ # Update a list of references from X -> Y
+ #
+ # Ref list is expected to be an array of hashes in the form:
+ # old_sha:
+ # new_sha
+ # reference:
+ #
+ # When new_sha is Gitlab::Git::BLANK_SHA, then this will be deleted
+ def update_refs(ref_list)
+ wrapped_gitaly_errors do
+ gitaly_ref_client.update_refs(ref_list: ref_list) if ref_list.any?
+ end
+ end
+
def delete_refs(...)
wrapped_gitaly_errors do
gitaly_delete_refs(...)
@@ -959,10 +973,6 @@ module Gitlab
gitaly_repository_client.create_from_bundle(bundle_path)
end
- def create_from_snapshot(url, auth)
- gitaly_repository_client.create_from_snapshot(url, auth)
- end
-
def rebase(user, rebase_id, branch:, branch_sha:, remote_repository:, remote_branch:, push_options: [], &block)
wrapped_gitaly_errors do
gitaly_operation_client.rebase(