summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-07-13 17:58:45 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-07-13 18:05:55 +0200
commita87cca5f9c16f969beb5c2f7f819fd7b4f56b7dc (patch)
tree776ab9f59d75ed61366cc872cbd3e8df84bf900e /app
parentb2ecf0aa354b27e44aa2262489e7daef0f5ef159 (diff)
downloadgitlab-ce-a87cca5f9c16f969beb5c2f7f819fd7b4f56b7dc.tar.gz
More Gitaly annotations
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb2
-rw-r--r--app/services/git_operation_service.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 10b429c707e..8663cf5e602 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -123,6 +123,7 @@ class Repository
commits
end
+ # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/384
def find_commits_by_message(query, ref = nil, path = nil, limit = 1000, offset = 0)
unless exists? && has_visible_content? && query.present?
return []
@@ -610,6 +611,7 @@ class Repository
commit(sha)
end
+ # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/383
def last_commit_id_for_path(sha, path)
key = path.blank? ? "last_commit_id_for_path:#{sha}" : "last_commit_id_for_path:#{sha}:#{Digest::SHA1.hexdigest(path)}"
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 43636fde0be..32925e9c1f2 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -129,6 +129,7 @@ class GitOperationService
end
end
+ # Gitaly note: JV: wait with migrating #update_ref until we know how to migrate its call sites.
def update_ref(ref, newrev, oldrev)
# We use 'git update-ref' because libgit2/rugged currently does not
# offer 'compare and swap' ref updates. Without compare-and-swap we can