Open gauravsaxenais opened 3 years ago
_repository = new Repository("localfolderpath"); var network = _repository.Network.Remotes.First(); var refSpecs = new List() { network.FetchRefSpecs.First().Specification }; var fetchOptions = new FetchOptions { TagFetchMode = TagFetchMode.All }; fetchOptions.CredentialsProvider = (_url, _user, _cred) => new DefaultCredentials(); fetchOptions.CredentialsProvider += (_url, _user, _cred) => _userNamePasswordCredentials;
Commands.Pull(_repository, new Signature(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), DateTime.Now), new PullOptions() { FetchOptions = fetchOptions, MergeOptions = new MergeOptions() { MergeFileFavor = MergeFileFavor.Theirs, CommitOnSuccess = true } }); foreach (Remote remote in _repository.Network.Remotes) { Commands.Fetch(_repository, remote.Name, new string[0], fetchOptions, null); _repository.Network.Fetch(remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), fetchOptions); }
Libgit2Sharp 0.26.2
.Net Core 3.5, Microsoft Visual Studio Professional 2019 Version 16.9.0, .Net Framework 4.7.03190, Microsoft windows 10 pro.
Reproduction steps
_repository = new Repository("localfolderpath"); var network = _repository.Network.Remotes.First(); var refSpecs = new List() { network.FetchRefSpecs.First().Specification };
var fetchOptions = new FetchOptions { TagFetchMode = TagFetchMode.All };
fetchOptions.CredentialsProvider = (_url, _user, _cred) => new DefaultCredentials();
fetchOptions.CredentialsProvider += (_url, _user, _cred) => _userNamePasswordCredentials;
Expected behavior
Actual behavior
Version of LibGit2Sharp (release number or SHA1)
Libgit2Sharp 0.26.2
Operating system(s) tested; .NET runtime tested
.Net Core 3.5, Microsoft Visual Studio Professional 2019 Version 16.9.0, .Net Framework 4.7.03190, Microsoft windows 10 pro.