diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-05-30 23:25:25 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-01 01:16:01 +0300 |
commit | 96db70a4448fd1e736c10100dccf3a803ec553c0 (patch) | |
tree | 8d673cc15dc4db7ec1b7a809a5d0b3db7964b01a /app/models/merge_request.rb | |
parent | b965009ddddcd50e76841dbc97d2767292e88a0a (diff) |
Simplify merge_ref_head methods
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 25ad8f67496..38b9b886e5f 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1080,16 +1080,14 @@ class MergeRequest < ApplicationRecord # Returns the current merge-ref HEAD commit. # + # Consider calling mergeability_check method _before_ this if you need + # the latest possible version of it (it's already automatically updated + # along the merge_status). + # def merge_ref_head project.repository.commit(merge_ref_path) end - # Returns the updated merge-ref HEAD commit. - # - def merge_ref_head! - merge_ref_head if check_mergeability.success? - end - def ref_path "refs/#{Repository::REF_MERGE_REQUEST}/#{iid}/head" end |