Skip to content

Commit.find Failure #92

@cjbarth

Description

@cjbarth

Commit.find is failing because it is trying to call git ref-list --pretty=raw --max-count=1 The reason it isn't using the required parameter of <commit-id> is because the Commit.find call is in a callback for fs.readFile which returns an error because the folder .git/refs/heads doesn't contain anything (well some folders, but no files), so fs.readFile returns an error, which the callback call to Commit.find completely ignores and thereby fails. I feel like instead of going through all that effort to find the Head.current one could just call git ref-list --pretty=raw --max-count=1 HEAD and be done with it.

I'm calling git(path/to/repo).branch(callback) that calls Repo.prototype.branch which calls Head.current(this, callback) because of my not having specified a name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions