GgitDiffPatch

GgitDiffPatch

Synopsis

                    GgitDiffPatch;
GgitDiffPatch *     ggit_diff_patch_ref                 (GgitDiffPatch *diff_patch);
void                ggit_diff_patch_unref               (GgitDiffPatch *diff_patch);
gchar *             ggit_diff_patch_to_string           (GgitDiffPatch *diff_patch,
                                                         GError **error);
gboolean            ggit_diff_patch_to_stream           (GgitDiffPatch *diff_patch,
                                                         GOutputStream *stream,
                                                         GError **error);

Object Hierarchy

  GBoxed
   +----GgitDiffPatch

Description

Details

GgitDiffPatch

typedef struct _GgitDiffPatch GgitDiffPatch;

Represents a patch object.


ggit_diff_patch_ref ()

GgitDiffPatch *     ggit_diff_patch_ref                 (GgitDiffPatch *diff_patch);

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

diff_patch :

a GgitDiffPatch.

Returns :

a GgitDiffPatch. [transfer none]

ggit_diff_patch_unref ()

void                ggit_diff_patch_unref               (GgitDiffPatch *diff_patch);

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

diff_patch :

a GgitDiffPatch.

ggit_diff_patch_to_string ()

gchar *             ggit_diff_patch_to_string           (GgitDiffPatch *diff_patch,
                                                         GError **error);

Gets the content of a patch as a single diff text.

diff_patch :

a GgitDiffPatch.

error :

a GError for error reporting, or NULL.

Returns :

the content of a patch as a single diff text.

ggit_diff_patch_to_stream ()

gboolean            ggit_diff_patch_to_stream           (GgitDiffPatch *diff_patch,
                                                         GOutputStream *stream,
                                                         GError **error);

Write the contents of a patch to the provided stream.

diff_patch :

a GgitDiffPatch.

stream :

a GOutputStream.

error :

a GError for error reporting, or NULL.

Returns :

TRUE if the patch was written successfully, FALSE otherwise.