Skip to content

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

Closed

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;

Activity

  1. ianhattendorf commented on Oct 31, 2022

    @ianhattendorf
    Member

    Fixed by #1942.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions