Skip to content

Git status crashes on empty repo #184

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

Closed
ghost opened this issue Oct 12, 2014 · 1 comment
Closed

Git status crashes on empty repo #184

ghost opened this issue Oct 12, 2014 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Oct 12, 2014

If you call the following sequence in an empty directory, or an directory with files but no commits, Git#status will crash.
Git.init
git = Git.open '.'
status = git.status

This is the output on the command line:
Git::GitExecuteError: git diff-index 'HEAD' 2>&1:fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.

@robertodecurnex robertodecurnex added this to the 1.2.9 milestone Dec 2, 2014
@robertodecurnex robertodecurnex self-assigned this Dec 2, 2014
othatbrian added a commit to othatbrian/ruby-git that referenced this issue Dec 7, 2014
othatbrian added a commit to othatbrian/ruby-git that referenced this issue Dec 8, 2014
@robertodecurnex robertodecurnex modified the milestone: 1.2.9 Jan 12, 2015
@stale
Copy link

stale bot commented Apr 2, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 2, 2018
@stale stale bot closed this as completed Apr 9, 2018
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

1 participant