I'm trying to colorize the output of a patch. Setting the color.diff
config (via my .gitconfig) doesn't seem to do it.
repo = Rugged::Repository.new('/some/path')
repo.config = Rugged::Config.new("#{ENV['HOME']}/.gitconfig")
log.info repo.config['color.diff']
INFO color.diff: always
And I'm doing the following to show unstaged changes:
repo.index.diff.each do |patch|
puts patch
end
Can I get a prettier colorized diff?