summaryrefslogtreecommitdiff
path: root/app/models/commit_range.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-30 12:00:36 +0000
committerDouwe Maan <douwe@gitlab.com>2016-01-30 12:00:36 +0000
commitd240876abaf800c1878102201b7ee18569ac1708 (patch)
treeb95db52f06d8ddf1917344c57fd1809301d3c66b /app/models/commit_range.rb
parent55c4996b4d9f737a53f2a3c5b4d3449f5f5cba96 (diff)
parentd97742570fce0512eddb6dc6c924d541aa4f57e4 (diff)
downloadgitlab-ce-d240876abaf800c1878102201b7ee18569ac1708.tar.gz
Merge branch 'rs-issue-12706' into 'master'
Increase the minimum length for commit SHA matching to 7 This is the git default and will help to prevent false positive matches. Closes #12706 See merge request !2655
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r--app/models/commit_range.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb
index 14e7971fa06..289dbc57287 100644
--- a/app/models/commit_range.rb
+++ b/app/models/commit_range.rb
@@ -32,8 +32,8 @@ class CommitRange
PATTERN = /#{REF_PATTERN}\.{2,3}#{REF_PATTERN}/
# In text references, the beginning and ending refs can only be SHAs
- # between 6 and 40 hex characters.
- STRICT_PATTERN = /\h{6,40}\.{2,3}\h{6,40}/
+ # between 7 and 40 hex characters.
+ STRICT_PATTERN = /\h{7,40}\.{2,3}\h{7,40}/
def self.reference_prefix
'@'