-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
stop expecting master to be the default branch for git #503
stop expecting master to be the default branch for git #503
Conversation
spec/support/factories.cr
Outdated
@@ -16,6 +16,9 @@ end | |||
def create_git_repository(project, *versions) | |||
Dir.cd(tmp_path) do | |||
run "git init #{Process.quote(project)}" | |||
Dir.cd(Process.quote(project)) do | |||
run "git branch -m master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to be git checkout --orphan master
because at this point there exists no branch that could be moved with branch -m
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both worked on my system, but if you prefer the latter then here it comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use main
? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test originally assumed that the default branch is "master". This is not the case for everyone any more. (e.g. I have a default branch called "main"). This PR fixes an assumption of the test that is not correct any more.
If you'd like to change the test to use some other branch name, that, IMHO should be a separate PR.
Thanks @szabgab |
Fixes #501