Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@evolvedlight
Copy link

This is needed for pushing changes to bitbucket server repos

PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism,
RemoteCallbacks = gitCallbacks,
ProxyOptions = new GitProxyOptions { Version = 1 },
CustomHeaders = pushOptions.CustomHeaders?.Length > 0 ? GitStrArrayManaged.BuildFrom(pushOptions.CustomHeaders) : new GitStrArrayManaged()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is null better than new GitStrArrayManaged() here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

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()
Copy link
Contributor

@James-LG James-LG Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitStrArrayManaged needs to be disposed. I have a similar PR that does that here #2052 by following the pattern set by GitFetchOptionsWrapper.

@evolvedlight
Copy link
Author

Sorry, somehow I missed the notifications on the comment. Will close in favor of #2052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.