-
Notifications
You must be signed in to change notification settings - Fork 654
Remove requirement on master branch existing #724
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
- As per discussion here: https://gitter.im/GitTools/GitVersion?at=565781d10d143098620f6250 - Removed redundant code
@JakeGinnivan @pascalberger can you let me know what you think about this? |
LGTM |
@gep13 A test that confirms the new behavior would be nice. :) |
@asbjornu Normally I would agree, but I am not sure in this case. I was removing redundant code. If anything, I should have also been removing a redundant test, but there wasn't one. What exactly would a test do in this case? |
A test for a case without a master branch might indeed be helpful |
@gep13 What @pascalberger wrote. A pretty simple repository fixture test that creates a repository without a master branch and just asserts that everything went okay. |
+1, I assume you also tested this on your local. The only issue I can see is around the branch inheritance stuff, we often fallback to master or develop if we can't figure it out. But majority of the time you should be fine |
@JakeGinnivan yes, I tested it locally, and it seemed to work, although I got a strange asserted version number for a feature branch taken off the develop branch, but I haven't dug into that yet to see why it was taking the wrong number. I will see what I can do about creating a test fixture to cover this scenario, but I haven't really looked at that code yet. Any suggestions as a good one to start with as a basis? |
Then just delete master |
What exactly did you mean here? Thanks! |
The test will always create a master, branch off it to create develop then use libgit2sharp (exposed through the fixture.Repository) to delete master. Then that should be the basis for a test. |
Thanks to @JakeGinnivan this PR now has a test to go with the changes 👍 |
Remove requirement on master branch existing
https://gitter.im/GitTools/GitVersion?at=565781d10d143098620f6250