Skip to content

Support more than just "master" as the default branch #648

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 1 commit into from
Jul 24, 2020
Merged

Support more than just "master" as the default branch #648

merged 1 commit into from
Jul 24, 2020

Conversation

nicolas-grekas
Copy link
Member

No description provided.

(isset($branchAliases['dev-next']) && $alias = $branchAliases['dev-next']) ||
(isset($branchAliases['dev-current']) && $alias = $branchAliases['dev-current']) ||
(isset($branchAliases['dev-support']) && $alias = $branchAliases['dev-support']) ||
(isset($branchAliases['dev-tip']) && $alias = $branchAliases['dev-tip']) ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we even have all these cases ? To match the behavior of composer, only $branchAliases[$version] should be relevant. Branch aliases defined for other branches are totally ignored by composer (though they are allowed, so that you don't have to remove them between branches which would be a mess)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks at the branch-alias to decide which version of the recipe should be installed.
We can support more items than composer here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checking the branch alias of dev-tip when the installed version is not dev-tip looks weird to me. You want to install the recipe for the installed version, not for a random version.

Copy link
Member Author

@nicolas-grekas nicolas-grekas Jul 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still pretty common when checking out a custom dev-branch without aliasing it. E.g. for Symfony components, falling back to the dev-master alias is the best way to guess the version of the branch. That's why there is logic IIUC.

@nicolas-grekas nicolas-grekas merged commit f4d23ea into symfony:master Jul 24, 2020
@nicolas-grekas nicolas-grekas deleted the no-master branch August 25, 2020 08:23
tgalopin pushed a commit to tgalopin/flex that referenced this pull request Dec 3, 2020
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.

2 participants