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

Add support for Git repos with multiple remotes configured #1782

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Seb-MCaw
Copy link
Contributor

A Git repo may have multiple remotes configured, often with different branches tracking different remotes. For example, development may be done on a private repository, with release/production versions available on a public repository.

Currently Alire assumes there is at most one remote, and therefore ends up using whichever is first alphabetically when there is more than one. In practice, this is only relevant to alr publishing, since dependencies are always fetched as a plain git clone, which does indeed yield a repo with only one remote.

This PR makes this assumption more explicit where applicable, and adds a subprogram to Alire.Publish.Local_Repository which attempts to guess the appropriate remote when there is more than one.

@Seb-MCaw Seb-MCaw changed the title Add support for git repos with multiple remotes configured Add support for Git repos with multiple remotes configured Oct 14, 2024
@Seb-MCaw Seb-MCaw marked this pull request as ready for review October 14, 2024 16:21
@Seb-MCaw
Copy link
Contributor Author

This one is ready for review too, @mosteo. You can ignore my previous (deleted) comment.

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.

1 participant