diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-15 16:10:55 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-26 15:49:22 -0400 |
commit | 1a9da9178cfd25190997b621e428a5c7ce467cd1 (patch) | |
tree | a5edb5df2ba7d76e9fdc29e7eb7615e60fbb404a /app/models/commit.rb | |
parent | 5cc9b17b8a7d7a8081fa60ea75f6cf423fbddbc5 (diff) | |
download | gitlab-ce-1a9da9178cfd25190997b621e428a5c7ce467cd1.tar.gz |
Surround Project.reference_pattern in parenthesis inside other patterns
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 2c244fc0410..f02fe240540 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -72,7 +72,10 @@ class Commit # # This pattern supports cross-project references. def self.reference_pattern - %r{(?:#{Project.reference_pattern}#{reference_prefix})?(?<commit>\h{6,40})} + %r{ + (?:#{Project.reference_pattern}#{reference_prefix})? + (?<commit>\h{6,40}) + }x end def to_reference(from_project = nil) |