FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Getting the HEAD commit SHA · Issue #191 · nodegit/nodegit · GitHub

Repository navigation

Getting the HEAD commit SHA #191

Description

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.

Activity

  1. tybenz commented on Jul 22, 2014

    👍 I can't figure out how to do this either. Any pointers?

  2. tybenz commented on Jul 25, 2014

    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?

  3. tbranyen commented on Jul 25, 2014

    Member

    I've started working on it here (was receiving a segfault) so I'm trying to figure out what's up with that.

  4. fschwiet commented on Aug 13, 2014

    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) {
            ....
    
  5. maxkorp commented on Nov 11, 2014

    Collaborator

    This should be working on master now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL