Is there any way to get the commit SHA of the current HEAD? I have tried to use the API and the examples to try to figure it out, but I'm having no luck with it.
👍 I can't figure out how to do this either. Any pointers?
Was told to try to add git_reference_name_to_id to nodegit, but I'm having trouble.
Looks like git_reference_name_to_id is in types.json and nkallen.json. Does it need to be added to descriptor.json?
I've started working on it here (was receiving a segfault) so I'm trying to figure out what's up with that.
Do you mean like this?
var Q = require("q"); var nodegit = require("nodegit"); return Q() .then(function() { return Q.ninvoke(nodegit.Repo, "open", "."); }) .then(function(repo) { return Q() .then(function() { return Q.ninvoke(nodegit.Reference, "oidForName", repo, "HEAD"); }) .then(function(oidHead) { ....
This should be working on master now.
Is there any way to get the commit SHA of the current HEAD? I have tried to use the API and the examples to try to figure it out, but I'm having no luck with it.