Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented May 2, 2019

The Fetch(Remote remote, FetchOptions options) method was removed in the latest version of LibGit2Sharp. We need an alternative way to specify that the default refspec (from .git\config) should be used.

What this PR does

  • Pass an empty array of refspecs to Network.Fetch instead of defaulting to +refs/heads/*:refs/remotes/origin/*

Diagnosis

The extension was making two calls to the following method, one with remoteName set to origin and another with the name of the externally contributed pull request owner.

repository.Network.Fetch(remoteName, new[] { $"+refs/heads/*:refs/remotes/origin/*" }, fetchOptions);

This was causing the remote refs to change and the pull request detail pain would get stuck refreshing.

References

Fixes #2343

Fetch(Remote remote, FetchOptions options) was removed so we need a way to use the default refspec. This is done by passing an empty array of refspecs.
@jcansdale jcansdale requested a review from StanleyGoldman May 2, 2019 11:09
@StanleyGoldman StanleyGoldman merged commit 3d5240c into master May 2, 2019
@StanleyGoldman StanleyGoldman deleted the fixes/2343-fetch-refresh-cycle branch May 2, 2019 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Externally contributed pull requests get stuck in loop fetching/refreshing

2 participants