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
iv
gitlab-ce
Commits
bf8b8741
Commit
bf8b8741
authored
Nov 06, 2014
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix system silent call
parent
d1b489e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
lib/gitlab/git_ref_validator.rb
lib/gitlab/git_ref_validator.rb
+1
-1
lib/gitlab/utils.rb
lib/gitlab/utils.rb
+2
-3
No files found.
lib/gitlab/git_ref_validator.rb
View file @
bf8b8741
...
@@ -6,7 +6,7 @@ module Gitlab
...
@@ -6,7 +6,7 @@ module Gitlab
# Returns true for a valid reference name, false otherwise
# Returns true for a valid reference name, false otherwise
def
validate
(
ref_name
)
def
validate
(
ref_name
)
Gitlab
::
Utils
.
system_silent
(
Gitlab
::
Utils
.
system_silent
(
%W(git check-ref-format refs/
#{
ref_name
}
)
)
==
0
%W(git check-ref-format refs/
#{
ref_name
}
)
)
end
end
end
end
end
end
lib/gitlab/utils.rb
View file @
bf8b8741
...
@@ -5,10 +5,9 @@ module Gitlab
...
@@ -5,10 +5,9 @@ module Gitlab
# Run system command without outputting to stdout.
# Run system command without outputting to stdout.
#
#
# @param cmd [Array<String>]
# @param cmd [Array<String>]
# @return [
Integer] exit status
# @return [
Boolean]
def
system_silent
(
cmd
)
def
system_silent
(
cmd
)
IO
.
popen
(
cmd
).
close
Popen
::
popen
(
cmd
).
last
.
zero?
$?
.
exitstatus
end
end
end
end
end
end
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