summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-12 09:25:09 +0000
committerRémy Coutable <remy@rymai.me>2017-04-12 09:25:09 +0000
commitc43f7d4713a719d7090d7ec5fbe4a36d233282ad (patch)
tree7a74a7669a0ed8c84af7dfea532c5e1b79775513 /app/models
parent3842b654030cfbc590936f0836b3c380aebf4442 (diff)
parentd6cc8feb6ce0a8e39a1bc8830b932155713357da (diff)
downloadgitlab-ce-c43f7d4713a719d7090d7ec5fbe4a36d233282ad.tar.gz
Merge branch 'gitaly-testing' into 'master'
Setup and run a Gitaly server for testing if GitalyClient is enabled See merge request !10298
Diffstat (limited to 'app/models')
-rw-r--r--app/models/commit.rb15
-rw-r--r--app/models/repository.rb16
2 files changed, 16 insertions, 15 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 5c452f78546..8b8b3f00202 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -326,14 +326,13 @@ class Commit
end
def raw_diffs(*args)
- use_gitaly = Gitlab::GitalyClient.feature_enabled?(:commit_raw_diffs)
- deltas_only = args.last.is_a?(Hash) && args.last[:deltas_only]
-
- if use_gitaly && !deltas_only
- Gitlab::GitalyClient::Commit.diff_from_parent(self, *args)
- else
- raw.diffs(*args)
- end
+ # NOTE: This feature is intentionally disabled until
+ # https://gitlab.com/gitlab-org/gitaly/issues/178 is resolved
+ # if Gitlab::GitalyClient.feature_enabled?(:commit_raw_diffs)
+ # Gitlab::GitalyClient::Commit.diff_from_parent(self, *args)
+ # else
+ raw.diffs(*args)
+ # end
end
def diffs(diff_options = nil)
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 526ab1e77a7..2b11ed6128e 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -963,13 +963,15 @@ class Repository
end
def is_ancestor?(ancestor_id, descendant_id)
- Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled|
- if is_enabled
- raw_repository.is_ancestor?(ancestor_id, descendant_id)
- else
- merge_base_commit(ancestor_id, descendant_id) == ancestor_id
- end
- end
+ # NOTE: This feature is intentionally disabled until
+ # https://gitlab.com/gitlab-org/gitlab-ce/issues/30586 is resolved
+ # Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled|
+ # if is_enabled
+ # raw_repository.is_ancestor?(ancestor_id, descendant_id)
+ # else
+ merge_base_commit(ancestor_id, descendant_id) == ancestor_id
+ # end
+ # end
end
def empty_repo?