diff options
author | micael.bergeron <micaelbergeron@gmail.com> | 2017-11-15 09:12:04 -0500 |
---|---|---|
committer | micael.bergeron <micaelbergeron@gmail.com> | 2017-11-15 09:21:05 -0500 |
commit | 4374a38f0e8fbd856458a60f47083fb4d084d695 (patch) | |
tree | de063112d0909ac1c4fe0ad2c25f4466951a9abf /app/models/commit.rb | |
parent | a4072db0198896242886d22c644ed91c1016aa8d (diff) | |
download | gitlab-ce-4374a38f0e8fbd856458a60f47083fb4d084d695.tar.gz |
fix the commit reference pattern from matching other entities
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 6dba154a6ea..e28bf28fab3 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -26,7 +26,7 @@ class Commit DIFF_HARD_LIMIT_LINES = 50000 MIN_SHA_LENGTH = 7 - COMMIT_SHA_PATTERN = /\h{#{MIN_SHA_LENGTH},40}/.freeze + COMMIT_SHA_PATTERN = /\b(?<![~#!@:])\h{#{MIN_SHA_LENGTH},40}/.freeze def banzai_render_context(field) context = { pipeline: :single_line, project: self.project } |