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

#status fails on a new repo #459

Open
costa opened this issue Mar 15, 2020 · 9 comments
Open

#status fails on a new repo #459

costa opened this issue Mar 15, 2020 · 9 comments

Comments

@costa
Copy link

costa commented Mar 15, 2020

Subject of the issue

Git::GitExecuteError (git '--git-dir=/proj/my-proj/.git' '--work-tree=/proj/my-proj' diff-index 'HEAD' 2>&1:fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.)
when there is no HEAD.

($ git status works fine)

Your environment

  • version of git (2.20.1) and ruby-git (1.6.0)
  • version of ruby (2.6.5)

Steps to reproduce

$ cd "$(mktemp -d)"; git init .; echo 'Git.open(".").status' | ruby -rgit

Expected behaviour

a return value, perhaps?
with untracked/cached files preferably

Actual behaviour

exception above

@stale
Copy link

stale bot commented May 15, 2020

A friendly reminder that this issue had no activity for 60 days.

@stale stale bot added the stale label May 15, 2020
@costa
Copy link
Author

costa commented May 25, 2020

?

@stale stale bot removed the stale label May 25, 2020
@jelaniwoods
Copy link

@costa This happens to me as well. It looks like the culprit is that g.status doesn't actually call the git status. It calls git diff-files and then git diff-index HEAD, which will fail since there are no commits.

@stale
Copy link

stale bot commented Aug 19, 2020

A friendly reminder that this issue had no activity for 60 days.

@stale stale bot added the stale label Aug 19, 2020
@costa
Copy link
Author

costa commented Aug 23, 2020

@jcouball Hi James, are you sure the bot is necessary?

Also, your latest commit seems to have a problem with your credentials, probably to git misconfiguration.

@stale stale bot removed the stale label Aug 23, 2020
@jcouball
Copy link
Member

jcouball commented Sep 6, 2020

@costa, agree the bot is a pain.

Which last commit are you talking about?

@costa
Copy link
Author

costa commented Oct 19, 2020

Hey @jcouball, sorry for the delay, been a little crazy.

It was an offtopic remark, 4bef5ab looks like you haven't set the author correctly.
But this is not the issue here, of course.

@stale stale bot added the stale label Dec 25, 2020
@costa
Copy link
Author

costa commented Dec 25, 2020

@jcouball a friendly reminder that this issue hasn't been resolved yet...

@stale stale bot removed the stale label Dec 25, 2020
@stale
Copy link

stale bot commented Jan 9, 2022

A friendly reminder that this issue had no activity for 60 days.

@stale stale bot added the stale label Jan 9, 2022
@ruby-git ruby-git deleted a comment from stale bot Mar 3, 2023
@stale stale bot removed the stale label Mar 3, 2023
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

3 participants