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(const git_object *obj);

Parameters

In
obj

the repository object

Returns

the SHA1 id

Versions