diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-04 02:50:07 +0300 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-05 14:35:33 +0300 |
commit | 0b1084a4538bc46684c8620410988d3b1093e7ab (patch) | |
tree | 3bf6e43ac7ca966d00be25ec5b21509a83f169e8 /lib/gitlab/git_ref_validator.rb | |
parent | 1b1403804e03db3cea3ad6a84dcfead449ed29d5 (diff) |
Don't output to stdout from lib non-interactive methods
It pollutes the test output too much.
Diffstat (limited to 'lib/gitlab/git_ref_validator.rb')
-rw-r--r-- | lib/gitlab/git_ref_validator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/git_ref_validator.rb b/lib/gitlab/git_ref_validator.rb index 13cb08948bb..0fdd4dbe577 100644 --- a/lib/gitlab/git_ref_validator.rb +++ b/lib/gitlab/git_ref_validator.rb @@ -5,7 +5,8 @@ module Gitlab # # Returns true for a valid reference name, false otherwise def validate(ref_name) - system *%W(git check-ref-format refs/#{ref_name}) + Gitlab::Utils.system_silent( + %W(git check-ref-format refs/#{ref_name})) == 0 end end end |