You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay I see. The expectation is that when you call git.repo().init that it will create a corresponding master branch. What git.repo().init does is a 1:1 to git init. It creates a symbolic pointer to the refs/heads/master which doesn't exist since no commits have been made. This code should not be crashing Node though. The branch callback should be called with an applicable error.
Thanks for reporting, if you have any thoughts let me know. I'll comment back as soon as I have a patch.
Okay I thought about this more and I believe this can be considered expected behavior. Unless nodegit makes a commit for you (which is unexpected behavior) there is no way to have a master branch on repo creation.
Sorry I'm going slow at adding in writables, but commit creation is coming soon. I'd like it to be as painless as possible.
Activity
tbranyen commentedon Apr 23, 2011
Could you gist me the code you were running? When I patch this I want to ensure it covers what you were trying to do.
payload commentedon Apr 23, 2011
https://gist.github.com/938740
tbranyen commentedon Apr 23, 2011
Okay I see. The expectation is that when you call git.repo().init that it will create a corresponding master branch. What
git.repo().initdoes is a 1:1 to git init. It creates a symbolic pointer to the refs/heads/master which doesn't exist since no commits have been made. This code should not be crashing Node though. The branch callback should be called with an applicable error.Thanks for reporting, if you have any thoughts let me know. I'll comment back as soon as I have a patch.
tbranyen commentedon May 14, 2011
Okay I thought about this more and I believe this can be considered expected behavior. Unless nodegit makes a commit for you (which is unexpected behavior) there is no way to have a master branch on repo creation.
Sorry I'm going slow at adding in writables, but commit creation is coming soon. I'd like it to be as painless as possible.