diff --git a/src/GitHub.App/Services/GitClient.cs b/src/GitHub.App/Services/GitClient.cs index ee1bd9ea47..79dfb1df4c 100644 --- a/src/GitHub.App/Services/GitClient.cs +++ b/src/GitHub.App/Services/GitClient.cs @@ -74,27 +74,6 @@ public Task Push(IRepository repository, string branchName, string remoteName) }); } - public Task Fetch(IRepository repository, string remoteName) - { - Guard.ArgumentNotNull(repository, nameof(repository)); - Guard.ArgumentNotEmptyString(remoteName, nameof(remoteName)); - - return Task.Run(() => - { - try - { - repository.Network.Fetch(remoteName, new[] { "+refs/heads/*:refs/remotes/origin/*" }, fetchOptions); - } - catch (Exception ex) - { - log.Error(ex, "Failed to fetch"); -#if DEBUG - throw; -#endif - } - }); - } - public Task Fetch(IRepository repo, UriString cloneUrl, params string[] refspecs) { foreach (var remote in repo.Network.Remotes) diff --git a/src/GitHub.Exports.Reactive/Services/IGitClient.cs b/src/GitHub.Exports.Reactive/Services/IGitClient.cs index fccb36f260..192612f9fa 100644 --- a/src/GitHub.Exports.Reactive/Services/IGitClient.cs +++ b/src/GitHub.Exports.Reactive/Services/IGitClient.cs @@ -25,20 +25,12 @@ public interface IGitClient /// Task Push(IRepository repository, string branchName, string remoteName); - /// - /// Fetches the remote. - /// - /// The repository to pull - /// The name of the remote - /// - Task Fetch(IRepository repository, string remoteName); - /// /// Fetches from the remote, using custom refspecs. /// /// The repository to pull /// The name of the remote - /// The custom refspecs + /// The custom refspecs or none to use the default /// Task Fetch(IRepository repository, string remoteName, params string[] refspecs);