Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ def command(cmd, opts = [], chdir = true, redirect = '', &block)
global_opts = []
global_opts << "--git-dir=#{@git_dir}" if !@git_dir.nil?
global_opts << "--work-tree=#{@git_work_dir}" if !@git_work_dir.nil?
global_opts << ["-c", "color.ui=false"]

opts = [opts].flatten.map {|s| escape(s) }.join(' ')

Expand Down
4 changes: 2 additions & 2 deletions tests/units/test_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_logger
@git.branches.size

logc = File.read(log.path)
assert(/INFO -- : git '--git-dir=[^']+' '--work-tree=[^']+' branch '-a'/.match(logc))
assert(/INFO -- : git '--git-dir=[^']+' '--work-tree=[^']+' '-c' 'color.ui=false' branch '-a'/.match(logc))
assert(/DEBUG -- : diff_over_patches/.match(logc))

log = Tempfile.new('logfile')
Expand All @@ -31,7 +31,7 @@ def test_logger
@git.branches.size

logc = File.read(log.path)
assert(/INFO -- : git '--git-dir=[^']+' '--work-tree=[^']+' branch '-a'/.match(logc))
assert(/INFO -- : git '--git-dir=[^']+' '--work-tree=[^']+' '-c' 'color.ui=false' branch '-a'/.match(logc))
assert(!/DEBUG -- : diff_over_patches/.match(logc))
end

Expand Down