Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAGAIN error #18

Open
daisy1754 opened this issue Mar 10, 2022 · 1 comment
Open

EAGAIN error #18

daisy1754 opened this issue Mar 10, 2022 · 1 comment

Comments

@daisy1754
Copy link

possibly related to #1

When I run this tool via node on a big repo, I'm getting EAGAIN error on git rev-parse or merge-base

Error is like below (branch name is different every time I run the command)

git-delete-squashed
events.js:377
      throw er; // Unhandled 'error' event
      ^

Error: spawn git EAGAIN
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:280:12)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  errno: -35,
  code: 'EAGAIN',
  syscall: 'spawn git',
  path: 'git',
  spawnargs: [ 'merge-base', 'master', 'mynicebranch' ]
}
@daisy1754
Copy link
Author

seems like this code is issuing too many concurrent git process

  }).filter(branchName =>
    // Get the common ancestor with the branch and master
    Promise.join(
      git(['merge-base', selectedBranchName, branchName]),
      git(['rev-parse', `${branchName}^{tree}`]),
      (ancestorHash, treeId) => git(['commit-tree', treeId, '-p', ancestorHash, '-m', `Temp commit for ${branchName}`])
    )
      .then(danglingCommitId => git(['cherry', selectedBranchName, danglingCommitId]))
      .then(output => output.startsWith('-'))
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant