Skip to content

Better error messages when invalid git-dir specified #5

@tarmstrong

Description

@tarmstrong

If I run git2json in my home directory, this happens:

tavish@temeraire:~ $ git2json
fatal: Not a git repository (or any parent up to mount parent /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[null]

If I run it with --git-dir specified, but not to the .git folder, I get this:

tavish@temeraire:~ $ git2json --git-dir=code/git2json
fatal: Not a git repository: 'code/git2json'
[null]

These should 1) print a good error message 2) have a non-zero exit status 3) not output anything to stdout.

Originally reported in #2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions