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
543dcdac
Commit
543dcdac
authored
Apr 11, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Statisfy Robertcop and Seancop
parent
4f8c36c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+3
-9
app/views/projects/merge_requests/show/_versions.html.haml
app/views/projects/merge_requests/show/_versions.html.haml
+1
-1
No files found.
app/models/merge_request_diff.rb
View file @
543dcdac
...
@@ -135,15 +135,9 @@ class MergeRequestDiff < ActiveRecord::Base
...
@@ -135,15 +135,9 @@ class MergeRequestDiff < ActiveRecord::Base
end
end
def
diff_refs
=
(
new_diff_refs
)
def
diff_refs
=
(
new_diff_refs
)
if
new_diff_refs
self
.
base_commit_sha
=
new_diff_refs
&
.
base_sha
self
.
base_commit_sha
=
new_diff_refs
.
base_sha
self
.
start_commit_sha
=
new_diff_refs
&
.
start_sha
self
.
start_commit_sha
=
new_diff_refs
.
start_sha
self
.
head_commit_sha
=
new_diff_refs
&
.
head_sha
self
.
head_commit_sha
=
new_diff_refs
.
head_sha
else
self
.
base_commit_sha
=
nil
self
.
start_commit_sha
=
nil
self
.
head_commit_sha
=
nil
end
end
end
def
diff_refs
def
diff_refs
...
...
app/views/projects/merge_requests/show/_versions.html.haml
View file @
543dcdac
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
-
if
@start_sha
-
if
@start_sha
Comments are disabled because you're comparing two versions of this merge request.
Comments are disabled because you're comparing two versions of this merge request.
-
else
-
else
Discussions on this
old
version of the merge request are displayed but comment creation is disabled.
Discussions on this version of the merge request are displayed but comment creation is disabled.
.pull-right
.pull-right
=
link_to
'Show latest version'
,
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'btn btn-sm'
=
link_to
'Show latest version'
,
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'btn btn-sm'
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