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
24cf6865
Commit
24cf6865
authored
Nov 17, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly set comparison first commit when range includes a merge commit
parent
264dc3f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+2
-2
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+1
-1
No files found.
app/controllers/projects/compare_controller.rb
View file @
24cf6865
...
...
@@ -19,8 +19,8 @@ class Projects::CompareController < Projects::ApplicationController
if
compare_result
@commits
=
Commit
.
decorate
(
compare_result
.
commits
,
@project
)
@diffs
=
compare_result
.
diffs
@commit
=
@
commits
.
last
@first_commit
=
@
commits
.
first
@commit
=
@
project
.
commit
(
head_ref
)
@first_commit
=
@
project
.
commit
(
base_ref
)
@line_notes
=
[]
end
end
...
...
app/helpers/diff_helper.rb
View file @
24cf6865
...
...
@@ -171,7 +171,7 @@ module DiffHelper
def
commit_for_diff
(
diff
)
if
diff
.
deleted_file
first_commit
=
@first_commit
||
@commit
first_commit
.
parent
first_commit
.
parent
||
@first_commit
else
@commit
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