optimization: avoid a fetch when checkout out a pull request
See original GitHub issueIn #4057 @niik mentions an opportunity to avoid a fetch
if we know the branch exists:
// TODO: I think we could skip this fetch if we know that we have the branch locally
// already. That way we'd match the behavior of checking out a branch.
if (defaultRemote) {
await this._fetchRemote(
repository,
defaultRemote,
FetchType.UserInitiatedTask
)
}
I’ll let @niik add any additional thoughts on the best approach here.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Optimise fetching all commits in a pull request #416 - GitHub
My goal is to lint all commit messages in a pull request, or in other words, since branching off the default branch.
Read more >check out a "pull request" on Git to review/test a PR
We have a repo that I have added to my local fork as Upstream. Someone sent a PR and I want to review...
Read more >Pull Request Proficiency: Fetching Abilities Unlocked - Atlassian
We've written a step by step tutorial on how to create a pull request using Bitbucket and GitHub's API. You don't have to...
Read more >git-fetch Documentation - Git
Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories.
Read more >Git Plugin Performance Improvement Phase-2 Progress
JENKINS-49757 - Avoid double fetch from Git checkout step This issue ... PR-931 This pull request is under review, will be shipped in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@agisilaos. Go for it! I’ll add it to our project board for tracking issues our community have claimed.
I believe I was referring to using the same logic that already exists in the forked-case: https://github.com/desktop/desktop/blob/321c3de0f143e29cfaab702dbc6e5766f8d91fda/app/src/lib/stores/app-store.ts#L3323-L3333
So I’d say the work consists of extracting that logic into something reusable and then verifying that my assumption was correct in the first place.