Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Browse Failed to Handle Brand New Repo #891

Closed
equt opened this issue Nov 11, 2020 · 1 comment
Closed

Git Browse Failed to Handle Brand New Repo #891

equt opened this issue Nov 11, 2020 · 1 comment

Comments

@equt
Copy link

equt commented Nov 11, 2020

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.

@spacewander
Copy link
Collaborator

Pull request is welcome!

spacewander added a commit that referenced this issue Nov 14, 2020
[ fix #891 ] Cast branch output if HEAD not exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants