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
gl status fails after resetting head of branch #195
Comments
My personal experience has been that if almost any file that git has been tracking is deleted (or moved elsewhere), gl status will generate key error 513. Attached is a zipped shell script that will reproduce the error in an empty git repository. HTH. |
Sorry, I forgot to note that I was using 0.8.7 of gitless as published by brew. If you need any additioonal information, please let me know. (The previous script is not commented. The attached script is the same with comments added.) |
Needs e2e test
Fix for issues gitless-vcs/gitless#195
I got the following error on "gl status" after I reset the head to the branch to a previous commit using "gl branch --set-head":
`On branch tmp, repo-directory //
✘ Some internal error occurred
➜ If you want to help, see http://gitless.com for info on how to report bugs and include the following information:
0.8.6
Traceback (most recent call last):
File "gitless/cli/gl.py", line 99, in main
File "gitless/cli/gl_status.py", line 45, in main
File "gitless/core.py", line 765, in status
KeyError: 513
`
Steps to reproduce:
Other gl commands fail too from this point on. The only way to resolve this situation that I could find is to manually recreate the deleted file (touch f.txt).
I think there are really two issues here: the obvious that lets "gl status" crash and the "strange" behaviour of gl branch -sh. My expectation would be that resetting the head of a branch brings my workspace to a state that reflects this new head (possibly creating missing or removing non-existant files). This behaviour would be consistent to what "gl switch" does between branches.
The text was updated successfully, but these errors were encountered: