getReferences Callback is required
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 704
- PR merge metrics
- No merged PRs in 30d
Description
System information
- node version:
- npm or yarn version:
- OS/version/architecture:
- Applicable nodegit version:
v12.12.0
6.11.3
darwin
19.0.0
x64
This seems like a bug:
import * as Git from "nodegit"
Git.Repository.open(".")
.then(async repo => {
return repo.getReferences(Git.Reference.TYPE.OID)
})
.catch(console.error)
❯ yarn -s ts-node test.ts
Error: Callback is required and must be a Function.
at /Users/jasonkuhrt/projects/prisma-labs/libre/node_modules/nodegit-promise/lib/node-extensions.js:24:20
at tryCallTwo (/Users/jasonkuhrt/projects/prisma-labs/libre/node_modules/nodegit-promise/lib/core.js:45:5)
at doResolve (/Users/jasonkuhrt/projects/prisma-labs/libre/node_modules/nodegit-promise/lib/core.js:173:13)
at new Promise (/Users/jasonkuhrt/projects/prisma-labs/libre/node_modules/nodegit-promise/lib/core.js:65:3)
at Repository.getReferences (/Users/jasonkuhrt/projects/prisma-labs/libre/node_modules/nodegit-promise/lib/node-extensions.js:19:12)
at /Users/jasonkuhrt/projects/prisma-labs/libre/test.ts:6:17
at Generator.next (<anonymous>)
at /Users/jasonkuhrt/projects/prisma-labs/libre/test.ts:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/jasonkuhrt/projects/prisma-labs/libre/test.ts:4:12)
Maybe related https://github.com/nodegit/nodegit/issues/1726
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the reported call in test.ts with Repository.getReferences in node-extensions.js and review the related issue #1726. Reproduce the shown Node/TypeScript example and inspect the existing promise/callback behavior; done means the call no longer raises the reported callback error and its references result can be observed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100