-
Notifications
You must be signed in to change notification settings - Fork 51
Description
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.