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
Jérome Perrin
gitlab-ce
Commits
458631c5
Commit
458631c5
authored
Mar 31, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary Commit.new
parent
bbfbff3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
app/contexts/commit_load_context.rb
app/contexts/commit_load_context.rb
+0
-1
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+1
-3
app/models/note.rb
app/models/note.rb
+1
-1
No files found.
app/contexts/commit_load_context.rb
View file @
458631c5
...
...
@@ -12,7 +12,6 @@ class CommitLoadContext < BaseContext
commit
=
project
.
repository
.
commit
(
params
[
:id
])
if
commit
commit
=
Commit
.
new
(
commit
)
line_notes
=
project
.
notes
.
for_commit_id
(
commit
.
id
).
inline
result
[
:commit
]
=
commit
...
...
app/helpers/commits_helper.rb
View file @
458631c5
...
...
@@ -109,9 +109,7 @@ module CommitsHelper
end
def
commit_to_html
commit
if
commit
.
model
escape_javascript
(
render
'commits/commit'
,
commit:
commit
)
end
escape_javascript
(
render
'commits/commit'
,
commit:
commit
)
end
def
diff_line_content
(
line
)
...
...
app/models/note.rb
View file @
458631c5
...
...
@@ -130,7 +130,7 @@ class Note < ActiveRecord::Base
# override to return commits, which are not active record
def
noteable
if
for_commit?
Commit
.
new
(
project
.
repository
.
commit
(
commit_id
)
)
project
.
repository
.
commit
(
commit_id
)
else
super
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