diff --git a/LibGit2Sharp/Commands/Fetch.cs b/LibGit2Sharp/Commands/Fetch.cs index d61fca5a5..eda0a671d 100644 --- a/LibGit2Sharp/Commands/Fetch.cs +++ b/LibGit2Sharp/Commands/Fetch.cs @@ -75,7 +75,7 @@ public static void Fetch(Repository repository, string remote, IEnumerable + diff --git a/LibGit2Sharp/Network.cs b/LibGit2Sharp/Network.cs index d5f032058..95ab3bd53 100644 --- a/LibGit2Sharp/Network.cs +++ b/LibGit2Sharp/Network.cs @@ -118,7 +118,7 @@ private IEnumerable 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) { @@ -375,7 +375,7 @@ public virtual void Push(Remote remote, IEnumerable pushRefSpecs, PushOp { PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism, RemoteCallbacks = gitCallbacks, - ProxyOptions = new GitProxyOptions { Version = 1 }, + ProxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto }, }); } } diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs index 41aaecfbf..6479bd846 100644 --- a/LibGit2Sharp/Repository.cs +++ b/LibGit2Sharp/Repository.cs @@ -678,7 +678,7 @@ public static IEnumerable 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) { @@ -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) { diff --git a/LibGit2Sharp/RepositoryExtensions.cs b/LibGit2Sharp/RepositoryExtensions.cs index edeb6b93f..e73f90e80 100644 --- a/LibGit2Sharp/RepositoryExtensions.cs +++ b/LibGit2Sharp/RepositoryExtensions.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; -using System.IO; +using Alphaleonis.Win32.Filesystem; using System.Linq; using LibGit2Sharp.Core; diff --git a/LibGit2Sharp/SubmoduleCollection.cs b/LibGit2Sharp/SubmoduleCollection.cs index fc508107a..c1c50261b 100644 --- a/LibGit2Sharp/SubmoduleCollection.cs +++ b/LibGit2Sharp/SubmoduleCollection.cs @@ -104,7 +104,7 @@ public virtual void Update(string name, SubmoduleUpdateOptions options) { Version = 1, CheckoutOptions = gitCheckoutOptions, - FetchOptions = new GitFetchOptions { ProxyOptions = new GitProxyOptions { Version = 1 }, RemoteCallbacks = gitRemoteCallbacks }, + FetchOptions = new GitFetchOptions { ProxyOptions = new GitProxyOptions { Version = 1, Type = GitProxyType.Auto }, RemoteCallbacks = gitRemoteCallbacks }, CloneCheckoutStrategy = CheckoutStrategy.GIT_CHECKOUT_SAFE };