System information
- node version: v16.14.2
- npm or yarn version: 8.5.0
- OS/version/architecture: debian
- Applicable nodegit version: 0.27.0 (or HEAD)
Issue
const refNames = await repo.getReferenceNames( nodegit.Reference.TYPE.DIRECT );
will return an empty array. TYPE.ALL will work.
Solution:
https://github.com/nodegit/nodegit/blob/master/lib/repository.js#L343
is missing a call.
it should be:
return type === Reference.TYPE.ALL || reference.type( ) === type;
instead of
return type === Reference.TYPE.ALL || reference.type === type;