diff --git a/app/decorators/commit_decorator.rb b/app/decorators/commit_decorator.rb
index cc8fa97587b53edfd2fe4eba453cbf897a92c8b0..074176ae802897a3c6e1078da2d19cb170c17155 100644
--- a/app/decorators/commit_decorator.rb
+++ b/app/decorators/commit_decorator.rb
@@ -1,6 +1,15 @@
 class CommitDecorator < ApplicationDecorator
   decorates :commit
 
+  # Returns a string describing the commit for use in a link title
+  #
+  # Example
+  #
+  #   "Commit: Alex Denisov - Project git clone panel"
+  def link_title
+    "Commit: #{author_name} - #{title}"
+  end
+
   # Returns the commits title.
   #
   # Usually, the commit title is the first line of the commit message.
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index 75fa835d5028045fbd309b565edf28f37965a7b2..9a07133d0b377e19865fee6001c72c2e1950bf4a 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -100,7 +100,7 @@ module Gitlab
 
     def reference_commit(identifier)
       if commit = @project.commit(identifier)
-        link_to(identifier, project_commit_path(@project, id: commit.id), html_options.merge(title: "Commit: #{commit.author_name} - #{CommitDecorator.new(commit).title}", class: "gfm gfm-commit #{html_options[:class]}"))
+        link_to(identifier, project_commit_path(@project, id: commit.id), html_options.merge(title: CommitDecorator.new(commit).link_title, class: "gfm gfm-commit #{html_options[:class]}"))
       end
     end
   end