Skip to content
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

Fix compiler specs git integration for configurable default branch #11754

Merged

Conversation

yxhuvud
Copy link
Contributor

@yxhuvud yxhuvud commented Jan 19, 2022

It is fairly common to define "main" as the default branch name, and
specs should not fail if that is configured.

Fixes #11753

@HertzDevil
Copy link
Contributor

HertzDevil commented Jan 19, 2022

Ideally there should be a spec for when init.defaultbranch is indeed overridden, but that's probably a bit difficult since it obviously cannot be overridden locally if the Git repository doesn't exist prior to crystal init. which seems possible due to #11753 (comment)?

It is fairly common to define "main" as the default branch name, and
specs should not fail if that is configured. Therefore a new branch is
checked out after initializing a new git repo for the specs that
are dependent on the branch name.
@yxhuvud yxhuvud force-pushed the fix/specs-use-default-git-branch branch from 337070d to 65084c9 Compare January 22, 2022 12:30
@yxhuvud
Copy link
Contributor Author

yxhuvud commented Jan 22, 2022

Updated based on #11753 (comment) . Instead of being dependent on the default branch name, it will always create a new one. There is really nothing in the behaviors being tested that care about if the branch was created by default or not.

@straight-shoota straight-shoota added this to the 1.4.0 milestone Jan 28, 2022
@straight-shoota straight-shoota changed the title Compiler specs: Don't fail if user has a different default git branch. Fix compiler specs git integration for configurable default branch Jan 29, 2022
@straight-shoota straight-shoota merged commit ba31a6e into crystal-lang:master Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler specs fail if git is configured with a different defaultBranch
5 participants