diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-09 14:50:25 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-19 13:14:52 -0500 |
commit | 328b52d58a36525fdc853f15877f87bcd7832d1c (patch) | |
tree | 6215b8b07a008c1b40d128d70331e901c443ea12 /app/models/commit.rb | |
parent | 38e708f0cea2f6707a26854b9d077182c063dd51 (diff) | |
download | gitlab-ce-328b52d58a36525fdc853f15877f87bcd7832d1c.tar.gz |
Some updates after last code review.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 25007c7f15a..3c0e042e2ed 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -220,17 +220,17 @@ class Commit end def revert_message - "Revert \"#{safe_message.lines.first.chomp}\"".truncate(80) + "\n\nReverts #{to_reference}" + "Revert \"#{title}\"".truncate(80) + "\n\nReverts #{sha}" end - def is_a_merge_commit? + def merge_commit? parents.size > 1 end def merged_merge_request return @merged_merge_request if defined?(@merged_merge_request) - @merged_merge_request = is_a_merge_commit? && MergeRequest.where(merge_commit_sha: id).first + @merged_merge_request = merge_commit? && MergeRequest.find_by(merge_commit_sha: id) end private |