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
e8861516
Commit
e8861516
authored
Mar 19, 2019
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of avoid_es_loading_commits
parent
12818c20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
lib/gitlab/git/commit.rb
lib/gitlab/git/commit.rb
+8
-1
No files found.
lib/gitlab/git/commit.rb
View file @
e8861516
...
...
@@ -184,11 +184,12 @@ module Gitlab
end
end
def
initialize
(
repository
,
raw_commit
,
head
=
nil
)
def
initialize
(
repository
,
raw_commit
,
head
=
nil
,
lazy_load_parents:
false
)
raise
"Nil as raw commit passed"
unless
raw_commit
@repository
=
repository
@head
=
head
@lazy_load_parents
=
lazy_load_parents
init_commit
(
raw_commit
)
end
...
...
@@ -225,6 +226,12 @@ module Gitlab
author_name
!=
committer_name
||
author_email
!=
committer_email
end
def
parent_ids
return
@parent_ids
unless
@lazy_load_parents
@parent_ids
||=
@repository
.
commit
(
id
).
parent_ids
end
def
parent_id
parent_ids
.
first
end
...
...
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