## GgitOId GgitOId |

## Synopsis

                        GgitOId;
    GgitOId *           ggit_oid_copy                       (GgitOId *oid);
    void                ggit_oid_free                       (GgitOId *oid);
    GgitOId *           ggit_oid_new_from_string            (const gchar *str);
    GgitOId *           ggit_oid_new_from_raw               (const guchar *raw);
    gint                ggit_oid_compare                    (GgitOId *a,
                                                             GgitOId *b);
    gchar *             ggit_oid_to_string                  (GgitOId *oid);
    guint               ggit_oid_hash                       (GgitOId const *oid);
    gboolean            ggit_oid_equal                      (GgitOId const *a,
                                                             GgitOId const *b);

## Object Hierarchy

      GBoxed
       +----GgitOId

## Description

## Details

### GgitOId

    typedef struct _GgitOId GgitOId;

Represents a unique ID of any object.

### ggit_oid_copy ()

    GgitOId *           ggit_oid_copy                       (GgitOId *oid);

Copies `oid` into a newly allocated GgitOId.

`oid` : | a GgitOId.
Returns : | a newly allocated GgitOId. [transfer full]

### ggit_oid_free ()

    void                ggit_oid_free                       (GgitOId *oid);

Frees `oid`.

`oid` : | a GgitOId.

### ggit_oid_new_from_string ()

    GgitOId *           ggit_oid_new_from_string            (const gchar *str);

Parses a hex formatted object id into a GgitOId.

`str` : | input hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes).
Returns : | a newly allocated GgitOId or `NULL` on error. [transfer full]

### ggit_oid_new_from_raw ()

    GgitOId *           ggit_oid_new_from_raw               (const guchar *raw);

Creates a new GgitOId from a raw oid.

`raw` : | the raw input bytes to be copied.
Returns : | a newly allocated GgitOId. [transfer full]

### ggit_oid_compare ()

    gint                ggit_oid_compare                    (GgitOId *a,
                                                             GgitOId *b);

Compare two GgitOId structures.

`a` : | first GgitOId.
`b` : | second GgitOId.
Returns : | <0, 0, >0 if a < b, a == b, a > b.

### ggit_oid_to_string ()

    gchar *             ggit_oid_to_string                  (GgitOId *oid);

Converts `oid` into a readable string.

`oid` : | a GgitOId.
Returns : | a newly allocated string representing `oid`. [transfer full]

### ggit_oid_hash ()

    guint               ggit_oid_hash                       (GgitOId const *oid);

Computes a hash value for a git object identifier.

`oid` : | a GgitOId.
Returns : | the hash value

### ggit_oid_equal ()

    gboolean            ggit_oid_equal                      (GgitOId const *a,
                                                             GgitOId const *b);

Compares two GgitOId for equality.

`a` : | a GgitOId.
`b` : | a GgitOId.
Returns : | `TRUE` if `a` and `b` are equal, `FALSE` otherwise