Project

General

Profile

Defect #6054 ยป redmine-allow-filenames-with-spaces-on-git.patch

Patch to fix shell quoting of filenames in GitAdapter.lastrev() - Georg Lukas, 2010-08-06 11:20

View differences:

lib/redmine/scm/adapters/git_adapter.rb
return nil if path.nil?
cmd = "#{GIT_BIN} --git-dir #{target('')} log --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|
id = io.gets.split[1]
author = io.gets.match('Author:\s+(.*)$')[1]
    (1-1/1)