Skip to content

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

Merged
merged 3 commits into from
Jan 10, 2016

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Nov 27, 2015

@gep13
Copy link
Member Author

gep13 commented Nov 27, 2015

@JakeGinnivan @pascalberger can you let me know what you think about this?

@pascalberger
Copy link
Member

LGTM

@asbjornu
Copy link
Member

@gep13 A test that confirms the new behavior would be nice. :)

@gep13
Copy link
Member Author

gep13 commented Nov 27, 2015

@asbjornu said...
@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?

@pascalberger
Copy link
Member

A test for a case without a master branch might indeed be helpful

@asbjornu
Copy link
Member

@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.

@JakeGinnivan
Copy link
Contributor

+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

@gep13
Copy link
Member Author

gep13 commented Dec 1, 2015

@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?

@JakeGinnivan
Copy link
Contributor

@gep13
Copy link
Member Author

gep13 commented Jan 6, 2016

@JakeGinnivan said...
Then just delete master

What exactly did you mean here? Thanks!

@JakeGinnivan
Copy link
Contributor

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.

@gep13
Copy link
Member Author

gep13 commented Jan 9, 2016

Thanks to @JakeGinnivan this PR now has a test to go with the changes 👍

JakeGinnivan added a commit that referenced this pull request Jan 10, 2016
Remove requirement on master branch existing
@JakeGinnivan JakeGinnivan merged commit 0efe0b4 into GitTools:master Jan 10, 2016
@gep13 gep13 deleted the RemoveRedundantCode branch February 24, 2016 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants