Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
9d438edb
Commit
9d438edb
authored
Jun 22, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Anchestor check is Gitaly only now
Closes
https://gitlab.com/gitlab-org/gitaly/issues/308
parent
2bac2918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-16
No files found.
lib/gitlab/git/repository.rb
View file @
9d438edb
...
@@ -549,24 +549,9 @@ module Gitlab
...
@@ -549,24 +549,9 @@ module Gitlab
end
end
end
end
# Gitaly note: JV: check gitlab-ee before removing this method.
def
rugged_is_ancestor?
(
ancestor_id
,
descendant_id
)
return
false
if
ancestor_id
.
nil?
||
descendant_id
.
nil?
rugged_merge_base
(
ancestor_id
,
descendant_id
)
==
ancestor_id
rescue
Rugged
::
OdbError
false
end
# Returns true is +from+ is direct ancestor to +to+, otherwise false
# Returns true is +from+ is direct ancestor to +to+, otherwise false
def
ancestor?
(
from
,
to
)
def
ancestor?
(
from
,
to
)
Gitlab
::
GitalyClient
.
migrate
(
:is_ancestor
)
do
|
is_enabled
|
gitaly_commit_client
.
ancestor?
(
from
,
to
)
if
is_enabled
gitaly_commit_client
.
ancestor?
(
from
,
to
)
else
rugged_is_ancestor?
(
from
,
to
)
end
end
end
end
def
merged_branch_names
(
branch_names
=
[])
def
merged_branch_names
(
branch_names
=
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment