-
Notifications
You must be signed in to change notification settings - Fork 533
Fix issue #184 (Git status crashes on empty repo) #205
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
Conversation
I apologize if I'm a bit obtuse on what's happening here; I'm kind of new to contributing. It looks like you added links for several possibly related issues. #184 is the issue I attempted to fix; #205 is the fix I provided (i.e. this PR). You also mention #159 and #25. I believe those are slightly different. They are due to the first commit not returning a parent object. I made a simple change, a la filesystem semantics at the root of the filesystem, and made the initial commit be its own parent. This fix is here: Should I create a new pull request for that? (AFAICT, it fixes issues #25 and #159.) Also, what's the status of this pull request (just for my own edification)? I see the "milestone", but I'm not familiar with what that means. |
Hey Brian, I was just relating initial non/initial commit problems. I'm not expecting to fix them all with a single PR but, since they MAY be related, better to have the links at hand. Whenever you are fixing anything else you should create different p If those are strongly related you can just add some comments and push the changes to the same branch. 1.2.9 would be the next release. Hope to be closing this one within the next 2 weeks at most.Robertt -----Original Message----- I apologize if I'm a bit obtuse on what's happening here; I'm kind of new to contributing. It looks like you added links for several possibly related issues. #184 is the issue I attempted to fix; #205 is the fix I provided (i.e. this PR). You also mention #159 and #25. I believe those are slightly different. They are due to the first commit not returning a parent object. I made a simple change, a la filesystem semantics at the root of the filesystem, and made the initial commit be its own parent. This fix is here: Should I create a new pull request for that? (AFAICT, it fixes issues #25 and #159.) Also, what's the status of this pull request (just for my own edification)? I see the "milestone", but I'm not familiar with what that means. Reply to this email directly or view it on GitHub: |
Updating test repos to include a patch file
3fc1c27
to
b224195
Compare
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. |
When a repo is created, but before a commit is made, the index does not exist. ruby-git is trying to do a diff using HEAD; because the index doesn't exist, HEAD doesn't exist, so it explodes.
The solution below fixes this issue. Yes, I know "unless !" == "if", but I thought it was a little more clear that the conditional is there to protect against the case where the file does not exist. Feel free to change it to an "if" or move it to the front with an "&&".
I didn't specifically see anywhere else where the use of HEAD on an empty repo would occur, but I'm not terribly familiar with this project. This seemed a more direct solution that trying to implement a "GitObjectNotFound" kind of error.