-
Notifications
You must be signed in to change notification settings - Fork 256
Request support git "insteadOf" url aliases #1150
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
Comments
I don't appreciate the rude tone as I do this on my own time for $0. |
Look, I wasn't trying to be rude. I was just opening an issue. I'm sorry to bother you; I'll work on fixing it myself and submit a PR at some point. |
I've re-read the original post, and I'm not sure what you've identified as "rude". Was it this?
Maybe the description is a bit terse, but I think it accurately captures the behavior. I apologize if it came across as rude. For what it's worth, I also work on software for $0 in my spare time, so we have in common, at least. If other folks want to tackle this, note that the underlying problem is that PSR relies on GitPython, which has been in "maintenance mode" for at least eight years. The most relevant issue was opened backed in 2017, and has remained untouched since then. The correct path forward is probably to fix this in GitPython, but note that even if it gets fixed there, PSR will need to update its dependencies, which currently pins GitPython to |
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
It turns out there's a relatively simple way to work around this; I've submitted a pull request that addresses the problem. |
Thanks for the apology, I was probably having a bit of a long day and took it overly personal as I had never heard of the instead of aliasing option before. It's quite difficult to get all scenarios of use covered.
We do, which software is that?
That is good research you have completed and it would be nice to have GitPython still maintained. No need to bump the version, the approximation value only locks the major version of |
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
…dOf` configurations Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
…dOf` configurations Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
…dOf` configurations Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
…dOf` configurations Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
…dOf` configurations Git permits creating URL aliases through the use of the insteadOf directive [1]. For example, given a configuration like this: [url "ssh://git@github.com/larsks/"] insteadOf = me: We can reference a remote project like this: git clone me:myproject Which will act as if we had actually typed: git clone ssh://git@github.com/larsks/myproject Previously, python-semantic-release would attempt to use the raw url from the repository configuration (`me:myproject` in the above example), and would fail to parse it because it's not actually a url. With this change, psr instead calls out to `git remote get-url`, which fully expands the url for us. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf Closes: python-semantic-release#1150
🎉 This issue has been resolved in Version 9.17.0 🎉You can find more information about this release on the GitHub Releases page. |
Bug Report
Description
With a configuration like this in my global git config:
I can clone a repository like this:
Which ends up looking like this:
Which ultimately causes psr to fail like this:
Expected behavior
PSR would not have thrown an error because it would have been able to interpret my git configuration and extracted the remote URL just as git normally can.
If you use
git remote get-url <remote>
command, it will return a fully expanded url via theinsteadOf
setting.Actual behavior
PSR errored out with a failure message of a bad remote URL because it retrieved the remote url setting which in raw form is an invalid URL rather than using the git interpreter which supports the
insteadOf
alias attribute and would of returned a valid remote URL value.Environment
The text was updated successfully, but these errors were encountered: