Skip to content

TreeEntry has no dirtoparent when it is obtained via Tree.entries() #591

Description

@tomruggs

I'm iterating over Tree.entries() and working with each individual TreeEntry. The problem is that if I attempt to call toString() or path() on the TreeEntries I get:

�[90m    �[36mTypeError: Arguments to path.join must be strings
        at path.js:360:15
        at Array.filter (native)
        at Object.exports.join (path.js:358:36)
        at TreeEntry.path (/opt/packages/teamcity/work/739e0919cda857a9/node_modules/nodegit/lib/tree_entry.js:82:15)

This is because the TreeEntries that come from the entries() list do not go through getEntry() and therefore do not ever have a dirtoparent property assigned to them.

This was introduced a few weeks ago here:

c7f86de#diff-a170a8f0bb4e54cd4900b5fc814eeccdR82

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