git init produces an error: fatal: ambiguous argument 'HEAD'
russmack opened this issue · 2 comments
russmack commented
Describe the bug
git init
produces:
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Other (all?) git command produce the same.
To Reproduce
Steps to reproduce the behavior:
- Type
git init
- See error
Expected behavior
No error.
Desktop (please complete the following information):
- OS: Arch Linux
- Git Version 2.30.0
- Geometry version: latest a8033e0
lox commented
This happens whenever there isn't a commit in the repo, the relevant line is https://github.com/geometry-zsh/geometry/blob/main/functions/geometry_git#L31.
I think it should be git diff --quiet
vs git diff-index --quiet HEAD
.
jamescostian commented
Resolved by #304