fix: resolve the remote URI using url.*.insteadOf#1394
Merged
Conversation
Contributor
|
FYI, this kind of thing (calling the git binary) has been responsible for a CVE. I'd avoid it as much as possible. |
Contributor
Author
yeah, i'm in the process of trying to make this work via go-git. i really don't like how half-baked it feels given that it's the "de facto" libgit2 implementation for golang. |
e742ce3 to
973da59
Compare
973da59 to
f96836c
Compare
This change introduces a new method for resolving the URI for a given remote (by name), ensuring that the URI is rewritten following the rules defined in `url.*.insteadOf` configuration. When `go-git@69aefb67315d775bf73df836b1e3ba5a3b321198` lands in a release (and we update go-git to that release), this should be refactored to use `config.URL.InsteadOfs()`, which supports multiple `url.*.insteadOf` configuration blocks instead of the current limitation of always taking the last definition. Closes: #944 Change-Id: Iffd111a1f4c42eff12613dcbd1b0d27df415f5e8
f96836c to
8798018
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces a new method for resolving the URI for a given
remote (by name), ensuring that the URI is rewritten following the rules
defined in
url.*.insteadOfconfiguration.When
go-git@69aefb67315d775bf73df836b1e3ba5a3b321198lands in arelease (and we update go-git to that release), this should be
refactored to use
config.URL.InsteadOfs(), which supports multipleurl.*.insteadOfconfiguration blocks instead of the current limitationof always taking the last definition.
Closes: #944
Change-Id: Iffd111a1f4c42eff12613dcbd1b0d27df415f5e8