You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
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.
Commit.find is failing because it is trying to call
git ref-list --pretty=raw --max-count=1The reason it isn't using the required parameter of<commit-id>is because theCommit.findcall is in a callback forfs.readFilewhich returns an error because the folder.git/refs/headsdoesn't contain anything (well some folders, but no files), sofs.readFilereturns an error, which the callback call toCommit.findcompletely ignores and thereby fails. I feel like instead of going through all that effort to find theHead.currentone could just callgit ref-list --pretty=raw --max-count=1 HEADand be done with it.I'm calling
git(path/to/repo).branch(callback)that callsRepo.prototype.branchwhich callsHead.current(this, callback)because of my not having specified a name.