Skip to content

repo.getReferenceNames( nodegit.Reference.TYPE.DIRECT ) does not work. #1935

Description

@axkibe

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions