# libgit2: Resolving HEAD to a SHA

2 messages from 2011-03-03 to 2011-03-03. Participants: Joshua Jensen, Sverre Rabbelier.
Thread: https://gitlist.dev/t/26650

## Joshua Jensen, 2011-03-03 16:08

Subject: libgit2: Resolving HEAD to a SHA
Message-ID: <4D6FBD00.6010208@workspacewhiz.com>
URL: https://gitlist.dev/e/4D6FBD00.6010208%40workspacewhiz.com

```
I spent a couple hours yesterday trying different methods of resolving 
HEAD to its appropriate SHA-1.  At best, I could get a resolution of 
HEAD to 'master'.

How do I achieve the functionality of 'git rev-parse' with the libgit2 API?

Thanks.

Josh

```

## Sverre Rabbelier, 2011-03-03 17:31

Subject: Re: libgit2: Resolving HEAD to a SHA
Message-ID: <AANLkTi=Cb2HTqopLs9J1cgakJGNz2O_o7mhW7nKzbqY2@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DCb2HTqopLs9J1cgakJGNz2O_o7mhW7nKzbqY2%40mail.gmail.com
In-Reply-To: <4D6FBD00.6010208@workspacewhiz.com>

```
Heya,

[+scott, vincent]

On Thu, Mar 3, 2011 at 17:08, Joshua Jensen <jjensen@workspacewhiz.com> wrote:
> I spent a couple hours yesterday trying different methods of resolving HEAD
> to its appropriate SHA-1.  At best, I could get a resolution of HEAD to
> 'master'.
>
> How do I achieve the functionality of 'git rev-parse' with the libgit2 API?
>
> Thanks.
>
> Josh

-- 
Cheers,

Sverre Rabbelier

```
