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

Support remote name configuration #21

Closed
rcisterna opened this issue Jul 13, 2022 · 4 comments
Closed

Support remote name configuration #21

rcisterna opened this issue Jul 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@rcisterna
Copy link

Existing Problem
Currently, change only support a remote named origin. So, if I have only one remote with a different name, it fails with an exit code 1, and a message saying remote origin url isn't set for this repo.

First Solution
It would be nice if, instead, change worked something like this:

  • If I have only one remote, change should use that one.
  • If I have more than one remote, try to use origin or fail just the way it fails now.
  • Allow to configure the name of the remote for all my repos (with an environment variable like CHANGE_REMOTE_NAME for example), or a .env like file (that could be called .change) to select the name of preferred remote.

Alternative Solutions
I actually don't have any more ideas.

Further Explaination
Screen Shot 2022-07-12 at 20 29 58

@rcisterna rcisterna added the enhancement New feature or request label Jul 13, 2022
@rcisterna
Copy link
Author

If you are open to it, I can help you with this 😁.

@adamtabrams
Copy link
Owner

I've created a PR that attempts to support this, but with a different strategy. Instead of adding logic to handle different remotes (which I couldn't find a robust way to parse) or adding a config file, this just uses urls instead (as supplied by git ls-remote --get-url).

@rcisterna I'm not sure if this use case is still relevant to you. But if it is, would you be willing to test if these code changes fix the issue?

@rcisterna
Copy link
Author

Hi @adamtabrams! It's currently not relevant to me, but it will be a pleasure to help you test the changes.

@adamtabrams
Copy link
Owner

Does the version here behave as you expect for branches with multiple remotes? Also when there's only one remote, but it isn't named origin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants