BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
merge_request.rb
app/models/merge_request.rb
+2
-2
_new_submit.html.haml
app/views/projects/merge_requests/_new_submit.html.haml
+1
-1
_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