Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Global git color configuration breaks Grit::Repo.log() #56

Open
marcaddeo opened this issue May 23, 2017 · 0 comments
Open

Global git color configuration breaks Grit::Repo.log() #56

marcaddeo opened this issue May 23, 2017 · 0 comments

Comments

@marcaddeo
Copy link

If you have the following in your ~/.gitconfig, Grit::Repo.log() will break.

[color]
  ui = always

To reproduce:

require_relative "lib/grit.rb"

Grit.debug = true
repo = Grit::Repo.new("test/dot_git", :is_bare => true)

repo.log("master", nil, :max_count => 1)

repo.log

Which outputs/throws the following error (screenshot to show colored output):

image

Right now I've only seen it specifically happening with the log method, as it was causing Gollum to crash immediately after I started using it.

Might be wise to add --color=never to all git commands, but I'm not even sure the flag is supported by all commands.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant