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

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

@marcaddeo

Description

@marcaddeo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions