10000 Setting Git proxy type auto where GitProxyOptions by KashmiraDeshpande · Pull Request #1689 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Setting Git proxy type auto where GitProxyOptions #1689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments. 8000
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Setting Git proxy type auto where GitProxyOptions version is set to o…
…ne in object initialisation
  • Loading branch information
KashmiraDeshpande committed Jun 17, 2019
commit 8f1868c4062cdce33f4cc6ca7e68f08eae71a83a
2 changes: 1 addition & 1 deletion LibGit2Sharp/Commands/Fetch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void Fetch(Repository repository, string remote, IEnumerable<strin
fetchOptions.CustomHeaders = GitStrArrayManaged.BuildFrom(options.CustomHeaders);
}

fetchOptions.ProxyOptions = new GitProxyOptions { Version = 1 };
fetchOptions.ProxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto };

Proxy.git_remote_fetch(remoteHandle, refspecs, fetchOptions, logMessage);
}
Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private IEnumerable<Reference> ListReferencesInternal(string url, CredentialsHan
using (RemoteHandle remoteHandle = BuildRemoteHandle(repository.Handle, url))
{
GitRemoteCallbacks gitCallbacks = new GitRemoteCallbacks { version = 1 };
GitProxyOptions proxyOptions = new GitProxyOptions { Version = 1 };
GitProxyOptions proxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto };

if (credentialsProvider != null)
{
Expand Down Expand Up @@ -375,7 +375,7 @@ public virtual void Push(Remote remote, IEnumerable<string> pushRefSpecs, PushOp
{
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism,
RemoteCallbacks = gitCallbacks,
ProxyOptions = new GitProxyOptions { Version = 1 },
ProxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto },
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ public static IEnumerable<Reference> ListRemoteReferences(string url, Credential
using (RemoteHandle remoteHandle = Proxy.git_remote_create_anonymous(repositoryHandle, url))
{
var gitCallbacks = new GitRemoteCallbacks { version = 1 };
var proxyOptions = new GitProxyOptions { Version = 1 };
var proxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto };

if (credentialsProvider != null)
{
Expand Down Expand Up @@ -768,7 +768,7 @@ public static string Clone(string sourceUrl, string workdirPath,
var gitCheckoutOptions = checkoutOptionsWrapper.Options;

var gitFetchOptions = fetchOptionsWrapper.Options;
gitFetchOptions.ProxyOptions = new GitProxyOptions { Version = 1 };
gitFetchOptions.ProxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto };
gitFetchOptions.RemoteCallbacks = new RemoteCallbacks(options).GenerateCallbacks();
if (options.FetchOptions != null && options.FetchOptions.CustomHeaders != null)
{
Expand Down
0