summaryrefslogtreecommitdiff
path: root/app/helpers/merge_requests_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-12 17:42:32 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-12 17:42:32 +0300
commit3dd7ad5064afa49aa74a7d40ba02fff7e67846d2 (patch)
tree1a4f2be3eb9fbf613a62e5839a3e04773d2ae545 /app/helpers/merge_requests_helper.rb
parentd0fb1835158467ce58c59f489384b13ad0f0ff7c (diff)
downloadgitlab-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.rb4
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