Remove the need to pass an account to getFallbackUrlForProxyResolve #18626
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.
xref #18586
Description
This is almost exclusively a refactor PR (notable exception is deleteRemoteBranch). We're trying to remove account from
withAuthenticatingUser
such that can freely modify (or remove) thegetGenericHostname
in order to be able to store more than one credential per host.Prior to this PR
getFallbackUrlForProxyResolve
required anIGitAccount
to resolve the url to use for resolving a proxy. ThatIGitAccount
came all the way fromwithAuthenticatingUser
and was resolved either by looking up the GitHubRepository associated with a Repository and using itsendpoint
to resolve an Account (which would then have the sameendpoint
) or by using thecurrentRemote
of the repository to look up a generic account. We've tried to replicate this ingetFallbackUrlForProxyResolve
while removing the need for an account.The
deleteRemoteBranch
method exception is that it would previously always make a call out togit remote
in order to look up the current remote. With this refactor we're using the already loaded remotes from theGitStore
to avoid that invocation (though we fall back to invoking if thegitStore
doesn't have the remote we need).Screenshots
Release notes
Notes: