Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/GitHub.App/Services/GitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 1 addition & 9 deletions src/GitHub.Exports.Reactive/Services/IGitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,12 @@ public interface IGitClient
/// <returns></returns>
Task Push(IRepository repository, string branchName, string remoteName);

/// <summary>
/// Fetches the remote.
/// </summary>
/// <param name="repository">The repository to pull</param>
/// <param name="remoteName">The name of the remote</param>
/// <returns></returns>
Task Fetch(IRepository repository, string remoteName);

/// <summary>
/// Fetches from the remote, using custom refspecs.
/// </summary>
/// <param name="repository">The repository to pull</param>
/// <param name="remoteName">The name of the remote</param>
/// <param name="refspecs">The custom refspecs</param>
/// <param name="refspecs">The custom refspecs or none to use the default</param>
/// <returns></returns>
Task Fetch(IRepository repository, string remoteName, params string[] refspecs);

Expand Down