Skip to content

git library is noisy #245

@driusan

Description

@driusan

The git subpackage uses Go's log package to print debugging information, which is suppressed by package main unless DGIT_TRACE is set.

I think this logic is backwards, because anyone who imports "github.com/driusan/dgit/git" to work with a git repo gets the noisy output by default and needs to manually suppress it. It also means that anyone using package log for their own purposes can't use the library.

We should probably be setting a logger in an init function in package git which discards by default, and adding a SetDebug(log.Logger) method (or perhaps something on the client object) to make the git subpackage more useful outside of the dgit command line without jumping through extra hoops.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions