Skip to content
This repository was archived by the owner on Apr 19, 2018. It is now read-only.
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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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