libgit2

git_object_id

Version:

Get the id (SHA1) of a repository object

In-memory objects created by git_object_new() do not have a SHA1 ID until they are written on a repository.

Signature

const git_oid *git_object_id(git_object *obj);

Parameters

git_object *
In
obj

the repository object

Returns

const git_oid *

the SHA1 id

Versions