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
987e3d94
Commit
987e3d94
authored
Jan 20, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MR diff_refs
parent
a010db5d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/merge_request.rb
app/models/merge_request.rb
+2
-2
app/views/projects/merge_requests/_new_submit.html.haml
app/views/projects/merge_requests/_new_submit.html.haml
+1
-1
app/views/projects/merge_requests/show/_diffs.html.haml
app/views/projects/merge_requests/show/_diffs.html.haml
+1
-1
No files found.
app/models/merge_request.rb
View file @
987e3d94
...
...
@@ -518,7 +518,7 @@ class MergeRequest < ActiveRecord::Base
@ci_commit
||=
source_project
.
ci_commit
(
last_commit
.
id
)
if
last_commit
&&
source_project
end
def
diff_r
ange
[
last_commit
.
parent
,
fir
st_commit
]
def
diff_r
efs
[
first_commit
.
parent
||
first_commit
,
la
st_commit
]
end
end
app/views/projects/merge_requests/_new_submit.html.haml
View file @
987e3d94
...
...
@@ -38,7 +38,7 @@
=
render
"projects/merge_requests/show/commits"
#diffs
.diffs.tab-pane.active
-
if
@diffs
.
present?
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
project:
@project
,
diff_refs:
@merge_request
.
diff_r
ange
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
project:
@project
,
diff_refs:
@merge_request
.
diff_r
efs
-
elsif
@commits
.
size
>
MergeRequestDiff
::
COMMITS_SAFE_SIZE
.alert.alert-danger
%h4
This comparison includes more than
#{
MergeRequestDiff
::
COMMITS_SAFE_SIZE
}
commits.
...
...
app/views/projects/merge_requests/show/_diffs.html.haml
View file @
987e3d94
-
if
@merge_request_diff
.
collected?
=
render
"projects/diffs/diffs"
,
diffs:
params
[
:w
]
==
'1'
?
@merge_request
.
diffs_no_whitespace
:
@merge_request
.
diffs
,
project:
@merge_request
.
project
,
diff_refs:
@merge_request
.
diff_r
ange
project:
@merge_request
.
project
,
diff_refs:
@merge_request
.
diff_r
efs
-
elsif
@merge_request_diff
.
empty?
.nothing-here-block
Nothing to merge from
#{
@merge_request
.
source_branch
}
into
#{
@merge_request
.
target_branch
}
-
else
...
...
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