question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

optimization: avoid a fetch when checkout out a pull request

See original GitHub issue

In #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:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
iAmWillShepherdcommented, Feb 27, 2018

@agisilaos. Go for it! I’ll add it to our project board for tracking issues our community have claimed.

1reaction
niikcommented, Mar 12, 2018

Before I start working on this, I would love to know your additional thoughts or any other info that may help me during the process.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found