diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-12 17:42:32 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-12 17:42:32 +0300 |
commit | 3dd7ad5064afa49aa74a7d40ba02fff7e67846d2 (patch) | |
tree | 1a4f2be3eb9fbf613a62e5839a3e04773d2ae545 /app/helpers/merge_requests_helper.rb | |
parent | d0fb1835158467ce58c59f489384b13ad0f0ff7c (diff) | |
download | gitlab-ce-3dd7ad5064afa49aa74a7d40ba02fff7e67846d2.tar.gz |
Improve mr compare message when base is differentdz-improve-mr-compar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index b0a76765d97..249cb44e9d5 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -123,4 +123,8 @@ module MergeRequestsHelper def version_index(merge_request_diff) @merge_request_diffs.size - @merge_request_diffs.index(merge_request_diff) end + + def different_base?(version1, version2) + version1 && version2 && version1.base_commit_sha != version2.base_commit_sha + end end |