From bd511194607b33cf504de11f0a70c71cd6898192 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Sun, 26 Sep 2010 19:07:46 +0000 Subject: Support spaces in the files or directories in the git adapter. #6054 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by Felix Schäfer git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4188 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/git_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 9a79bbb07..f455a57f5 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -88,7 +88,7 @@ module Redmine return nil if path.nil? cmd = "#{GIT_BIN} --git-dir #{target('')} log --date=iso --pretty=fuller --no-merges -n 1 " cmd << " #{shell_quote rev} " if rev - cmd << "-- #{path} " unless path.empty? + cmd << "-- #{shell_quote path} " unless path.empty? shellout(cmd) do |io| begin id = io.gets.split[1] @@ -121,7 +121,7 @@ module Redmine cmd << "#{shell_quote(identifier_from + '..')}" if identifier_from cmd << "#{shell_quote identifier_to}" if identifier_to cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since] - cmd << " -- #{path}" if path && !path.empty? + cmd << " -- #{shell_quote path}" if path && !path.empty? shellout(cmd) do |io| files=[] -- cgit v1.2.3