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
Boxiang Sun
gitlab-ce
Commits
10ae0d83
Commit
10ae0d83
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_ancestor` with `ancestor?`
parent
90112f57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/checks/force_push.rb
lib/gitlab/checks/force_push.rb
+1
-1
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-1
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
No files found.
lib/gitlab/checks/force_push.rb
View file @
10ae0d83
...
...
@@ -12,7 +12,7 @@ module Gitlab
!
project
.
repository
.
gitaly_commit_client
.
is_ancestor
(
oldrev
,
newrev
)
.
ancestor?
(
oldrev
,
newrev
)
else
Gitlab
::
Git
::
RevList
.
new
(
path_to_repo:
project
.
repository
.
path_to_repo
,
...
...
lib/gitlab/git/repository.rb
View file @
10ae0d83
...
...
@@ -440,7 +440,7 @@ module Gitlab
# Returns true is +from+ is direct ancestor to +to+, otherwise false
def
ancestor?
(
from
,
to
)
gitaly_commit_client
.
is_ancestor
(
from
,
to
)
gitaly_commit_client
.
ancestor?
(
from
,
to
)
end
# Return an array of Diff objects that represent the diff
...
...
lib/gitlab/gitaly_client/commit_service.rb
View file @
10ae0d83
...
...
@@ -22,7 +22,7 @@ module Gitlab
end
end
def
is_ancestor
(
ancestor_id
,
child_id
)
def
ancestor?
(
ancestor_id
,
child_id
)
request
=
Gitaly
::
CommitIsAncestorRequest
.
new
(
repository:
@gitaly_repo
,
ancestor_id:
ancestor_id
,
...
...
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