summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-21 16:20:24 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-25 14:40:40 -0400
commit2c8bfedb205d2da016f64ef8eb9d24a47d5f88d6 (patch)
tree4f3afb53a02bc5b77b55ce30a52dd97875521497 /lib
parent89775da8e5e823e9fe90dc1fc2959a8d861c9fc2 (diff)
downloadgitlab-ce-2c8bfedb205d2da016f64ef8eb9d24a47d5f88d6.tar.gz
Always use short SHAs as commit reference link text
Now when a user pastes a full SHA like `d7f61affaf845f44b4cc995e34eb1606c47c8eff`, its link text will only show `d7f61aff` for brevity.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/markdown/commit_reference_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/markdown/commit_reference_filter.rb b/lib/gitlab/markdown/commit_reference_filter.rb
index 41fb03cdd41..b20b29f5d0c 100644
--- a/lib/gitlab/markdown/commit_reference_filter.rb
+++ b/lib/gitlab/markdown/commit_reference_filter.rb
@@ -59,7 +59,7 @@ module Gitlab
%(<a href="#{url}"
title="#{title}"
- class="#{klass}">#{project_ref}#{commit_ref}</a>)
+ class="#{klass}">#{project_ref}#{commit.short_id}</a>)
else
match
end