-
Notifications
You must be signed in to change notification settings - Fork 729
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
Worktree.Status() always fail #299
Comments
@kyoh86 same for me. Falls back to this check, which, if I remove it, resolves the issue and things actually work. So I have no idea why this check is in there. |
I am running into the same issue. Oddly others on my team are able to run the code in question, but I am not. |
In my case the issue was that I had enabled a new git feature: FSMonitor. go-git does not support the header for this feature yet and thus was causing it to barf. |
After a night of sleep, the probable best direction to take this issue is to improve the error handling on the plumbing/format/index/decoder.go. It currently assumes that an error means it has reached EOF and thus is done. But there are many possible error cases that can happen within the loop. Better handling of the errors that happen within the for loop will result in better understanding of what is happening for the users. |
I'm facing the same issue even with FSMonitor turned off.. |
@mcuadros how about this? |
any news on having a fix/workaround for this? |
I ran into this issue as well, and ended up building from source and mucking around a bit to try and figure out what was going on. Not sure if it's helpful for anyone else, but my issue was that I had in my
and that was causing a git index header of Anyway, I remove the setting from my |
I created for testing purposes a small repo locally with only one commit in it. If I now try to execute I already checked, the described workarounds/fixes from this Issue, but none of them worked so far:
I also tested to comment out most of my |
@florianrusch would you be able to share a concise steps to reproduce? Does this happen on a specific public repository? |
Okay, I have it reproducible 💪 and I think I found my problem too. So first I will describe my problem and solution and then below you will find my setup/steps to reproduce it. My problem & solution
So I guess that something must be executed that changes/updates the git index (maybe the term Steps to reproduceHave the following in you
Do the following steps to create the repo: git init
touch README.md
git add README.md
git commit -m "INIT"
git status And this is my go program. I received the error from the path := "/path/to/my/repo"
r, err := g.PlainOpen(path)
if err != nil {
return err
}
worktree, err := r.Worktree()
if err != nil {
return err
}
status, err := worktree.Status()
if err != nil {
return err
} |
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while. This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed. We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active. Thanks for your understanding and cooperation! |
it's still alive. |
A fix for this has been proposed on #1066. It would be great if anyone still experiencing it could confirm that it fixes the issue for them. |
The issue does not reproduce anymore when unsupported extensions are met, e.g. I had the "invalid checksum" issue when my Git configuration was
and I used at least once However, when using
the index of a repository is initialized using Very suspicious is the following part from
The index is being read using version 2.
|
It always return
invalid checksum
for any repository.The text was updated successfully, but these errors were encountered: