diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-11 10:03:13 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-19 13:14:53 -0500 |
commit | f088caca3b3f90829735c23d061fd55230d1be3e (patch) | |
tree | 9123751178150249a8763c4a58abf15f48f418ac /app/models/commit.rb | |
parent | 5ad78cdbda7e5393bda5267adc7e7aab3c11956f (diff) | |
download | gitlab-ce-f088caca3b3f90829735c23d061fd55230d1be3e.tar.gz |
Use a reference to the MR when reverting MRs.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 3c0e042e2ed..1237c50b759 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -220,7 +220,13 @@ class Commit end def revert_message - "Revert \"#{title}\"".truncate(80) + "\n\nReverts #{sha}" + description = if merged_merge_request + "Reverts #{@merged_merge_request.to_reference}" + else + "Reverts #{sha}" + end + + "Revert \"#{title}\"".truncate(80) + "\n\n#{description}" end def merge_commit? |