diff options
author | Robert Speicher <robert@gitlab.com> | 2015-11-17 18:51:40 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-11-17 18:51:40 +0000 |
commit | df6bb57921090ba9a9cfeb62cb012a503106389b (patch) | |
tree | ceefea7da2051ee638dea89c3db9462768181a7b /app/controllers | |
parent | 632f60cc76c1b2cd91a079ca8538d59fa28c9818 (diff) | |
parent | 24cf6865d3c0d47615a814c091cdb40bf513307e (diff) | |
download | gitlab-ce-df6bb57921090ba9a9cfeb62cb012a503106389b.tar.gz |
Merge branch 'compare-first-commit' into 'master'
Correctly set comparison first commit when range includes a merge commit
Fixes #3207.
See merge request !1814
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/compare_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 55134e11d15..5200d609cc9 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -20,8 +20,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 |