forked from danielmahon/gift
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit.find Failure #92
Comments
I've changed
to
And the problem is resolved. Would you be open for a PR for such a change, or do you see something wrong with this approach? |
I've found that the assumption that files will be in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 theCommit.find
call is in a callback forfs.readFile
which returns an error because the folder.git/refs/heads
doesn't contain anything (well some folders, but no files), sofs.readFile
returns an error, which the callback call toCommit.find
completely ignores and thereby fails. I feel like instead of going through all that effort to find theHead.current
one could just callgit ref-list --pretty=raw --max-count=1 HEAD
and be done with it.I'm calling
git(path/to/repo).branch(callback)
that callsRepo.prototype.branch
which callsHead.current(this, callback)
because of my not having specified a name.The text was updated successfully, but these errors were encountered: