Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
07649464
Commit
07649464
authored
Apr 14, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify regex.
parent
1221bec5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/key_fingerprint.rb
lib/gitlab/key_fingerprint.rb
+3
-3
No files found.
lib/gitlab/key_fingerprint.rb
View file @
07649464
...
@@ -27,10 +27,10 @@ module Gitlab
...
@@ -27,10 +27,10 @@ module Gitlab
return
nil
unless
cmd_status
.
zero?
return
nil
unless
cmd_status
.
zero?
# 16 hex bytes separated by ':', optionally starting with "MD5:"
# 16 hex bytes separated by ':', optionally starting with "MD5:"
fingerprint_match
=
cmd_output
.
match
(
/(MD5:)?(?<fingerprint>(?:
\h{2}:){15}\h{2})/
)
fingerprint_match
es
=
cmd_output
.
match
(
/(MD5:)?(?<fingerprint>(
\h{2}:){15}\h{2})/
)
return
nil
unless
fingerprint_match
return
nil
unless
fingerprint_match
es
fingerprint_match
[
:fingerprint
]
fingerprint_match
es
[
:fingerprint
]
end
end
private
private
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment