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.

trouble with git.checkout

See original GitHub issue

So I have repo and I want to checkout branch and I’ve called git.fetch branch (because when I try to checkout without it it give error that I need to use fetch first) depth: 1 then git.checkout of same branch and it freezes, the problem is method GitPackIndex::fromPack that read from buffer:

    await new Promise((resolve, reject) => {
      buffer2stream(pack)
        .pipe(listpack())
        .on('data', async ({ data, type, reference, offset, num }) => {

And my case the data event is not fired so the promise is never resolved and it keeps waiting. If something is wrong it should reject the promise, don’t know why it fail to read the buffer.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
jcubiccommented, Aug 8, 2018

It was not working when I last tested it but in 0.27.0 it works.

1reaction
jcubiccommented, Jun 1, 2018

What about checking buffer.length

await new Promise((resolve, reject) => {
      if (!pack.length) {
          return reject('meaningful error message');
      }
      buffer2stream(pack)
        .pipe(listpack())
        .on('data', async ({ data, type, reference, offset, num }) => {
Read more comments on GitHub >

github_iconTop Results From Across the Web

Git checkout issue and not able to move to any branch
Hi I solved my problem by deleting my previous branch and then using git fetch, then I used git checkout qa and it...
Read more >
git-checkout Documentation - Git
This is the default behavior of git checkout <commit> when <commit> is not a branch name. See the "DETACHED HEAD" section below for...
Read more >
How do you Git checkout a commit? | Solutions to Git Problems
Checking out commits in GitKraken is fast and straightforward. Simply right-click on a commit from the central graph and select Checkout this commit...
Read more >
Git error: Your local changes to the following files would be ...
When you get the Git checkout error, “Your local changes to the following files would be overwritten by checkout,” one likely cause is...
Read more >
Troubleshooting cloning errors - GitHub Docs
HTTPS cloning errors · Check your Git version · Ensure the remote is correct · Provide an access token · Check your permissions...
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