lib/docman/git_util.rb in docman-0.0.104 vs lib/docman/git_util.rb in docman-0.0.105

- old
+ new

@@ -67,10 +67,20 @@ depth = (depth and depth.is_a? Integer) ? "--depth #{depth}" : '' else single_branch='' depth='' end - exec("clone #{single_branch} #{depth} #{repo} #{path}") + if ENV.has_key? 'DOCMAN_GIT_CLONE_QUITE_STDERR' and ENV['DOCMAN_GIT_CLONE_QUITE_STDERR'] == '1' + quite = '--quiet' + else + quite = '' + end + if ENV.has_key? 'DOCMAN_GIT_CLONE_QUITE_STDOUT' and ENV['DOCMAN_GIT_CLONE_QUITE_STDOUT'] == '1' + stdout = '&> /dev/null' + else + stdout = '' + end + exec("clone #{quite} #{single_branch} #{depth} #{repo} #{path} #{stdout}") end def self.last_revision(path = nil, branch = 'HEAD') result = nil if self.repo? path