libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.12k stars 878 forks source link

Set GitProxyOptions type to default to auto #2043

Closed jones-gareth closed 7 months ago

jones-gareth commented 1 year ago

Fix for #1429.

Currently GitProxyOptions.Type is set to GitProxyType.none and it is not possible to use libgit2sharp through a proxy. By setting GitProxyOptions.Type to GitProxyType.Auto git config settings for http.proxy and https.proxy work as expected in libgit2sharp.

PR https://github.com/libgit2/libgit2sharp/pull/1689 also attempts to address this, but is still open. However, it is not legal to have a field initializer in a struct.

PR https://github.com/libgit2/libgit2sharp/pull/1708 did a nice job of fixing this issue, but it was closed by the author and not merged.

It would be really nice to have this feature in libgit2sharp.

jones-gareth commented 11 months ago

I've created a NUGET package from this PR.

bording commented 7 months ago

Thanks for the PR. I've incorporated setting the proxy type to auto by default in my comprehensive PR that adds proxy support, #2065.