GgitAnnotatedCommit: libgit2-glib Reference Manual

## GgitAnnotatedCommit GgitAnnotatedCommit |

## Functions

GgitAnnotatedCommit * | ggit_annotated_commit_ref ()
void | ggit_annotated_commit_unref ()
GgitOId * | ggit_annotated_commit_get_id ()

## Description

## Functions

### ggit_annotated_commit_ref ()

    GgitAnnotatedCommit *
    ggit_annotated_commit_ref (GgitAnnotatedCommit *annotated_commit);

Atomically increments the reference count of `annotated_commit` by one. This function is MT-safe and may be called from any thread.

#### Parameters

annotated_commit | a GgitAnnotatedCommit. |

#### Returns

a newly allocated GgitAnnotatedCommit or `NULL`.

[transfer none][nullable]

### ggit_annotated_commit_unref ()

    void
    ggit_annotated_commit_unref (GgitAnnotatedCommit *annotated_commit);

Atomically decrements the reference count of `annotated_commit` by one. If the reference count drops to 0, `annotated_commit` is freed.

#### Parameters

annotated_commit | a GgitAnnotatedCommit. |

### ggit_annotated_commit_get_id ()

    GgitOId *
    ggit_annotated_commit_get_id (GgitAnnotatedCommit *annotated_commit);

Gets the commit ID that the given `annotated_commit` refs to.

#### Parameters

annotated_commit | a GgitAnnotatedCommit. |

#### Returns

the commit ID that the given `annotated_commit` refs to or `NULL`.

[transfer full][nullable]

## Types and Values