Uh oh!
There was an error while loading. Please reload this page.
Add support for git push with custom headers - #2011
Conversation
| PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism, | ||
| RemoteCallbacks = gitCallbacks, | ||
| ProxyOptions = new GitProxyOptions { Version = 1 }, | ||
| CustomHeaders = pushOptions.CustomHeaders?.Length > 0 ? GitStrArrayManaged.BuildFrom(pushOptions.CustomHeaders) : new GitStrArrayManaged() |
There was a problem hiding this comment.
Is null better than new GitStrArrayManaged() here?
There was a problem hiding this comment.
The CustomHeaders field is of type GitStrArrayManaged, which is a struct type so non-nullable value type. So not without some other impacting modifications I think.
TackyTortoise
commented
Jun 6, 2023
Without this it is also seemingly impossible to push to Azure repository using a personal access token. I wonder why it was exposed in FetchOptions but not in PushOptions. |
| PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism, | ||
| RemoteCallbacks = gitCallbacks, | ||
| ProxyOptions = new GitProxyOptions { Version = 1 }, | ||
| CustomHeaders = pushOptions.CustomHeaders?.Length > 0 ? GitStrArrayManaged.BuildFrom(pushOptions.CustomHeaders) : new GitStrArrayManaged() |
There was a problem hiding this comment.
GitStrArrayManaged needs to be disposed. I have a similar PR that does that here #2052 by following the pattern set by GitFetchOptionsWrapper.
evolvedlight
commented
Oct 23, 2023
Sorry, somehow I missed the notifications on the comment. Will close in favor of #2052 |
This is needed for pushing changes to bitbucket server repos