Skip to content

Git Browse Failed to Handle Brand New Repo #891

@equt

Description

@equt

Git browse would first check the current HEAD and output a git fatal for the following line.

branch=$(git rev-parse --abbrev-ref HEAD)

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

To reproduce, just run git browse inside a brand new git repo. Casting the error into /dev/null should fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions