### Class

# Ggit Diff

#### Description [src]

    class Ggit.Diff : Ggit.Native
    {
      /* No available fields */
    }

Represents a diff list.

#### Ancestors

- GgitNative
- GgitObjectFactoryBase
- GObject

#### Constructors

###### ggit_diff_new_buffers

Same as `ggit_diff_blobs()` but using a buffers. Creates a `GgitDiff` which compares `buffer1` and `buffer2`.

###### ggit_diff_new_index_to_workdir

Creates a `GgitDiff` which compares the working directory and the index.

###### ggit_diff_new_tree_to_index

Creates a `GgitDiff` which compares `old_tree` and the index.

###### ggit_diff_new_tree_to_tree

Creates a `GgitDiff` which compares `old_tree` and `new_tree`.

###### ggit_diff_new_tree_to_workdir

Creates a `GgitDiff` which compares the working directory and `old_tree`.

#### Functions

###### ggit_diff_blob_to_buffer

Same as `ggit_diff_blobs()` but using a buffer.

###### ggit_diff_blobs

Iterates over the diff calling `file_cb`, `binary_cb`, `hunk_cb` and `line_cb`.

#### Instance methods

###### ggit_diff_find_similar

Transform `diff` marking file renames, copies, etc.. If `options` is set to `NULL`, then the default options will be used.

###### ggit_diff_foreach

Iterates over the diff calling `file_cb`, `binary_cb`, `hunk_cb` and `line_cb`.

###### ggit_diff_format_email

Create an e-mail ready patch from a diff.

###### ggit_diff_get_delta

Get the delta at the specified index.

###### ggit_diff_get_num_deltas

Get the number of deltas in the diff.

###### ggit_diff_merge

Merges `from` into `onto` unless `error` is set.

###### ggit_diff_print

Iterates over `diff` generating text output like “git diff”.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Ggit.Diff:repository

No description available.

##### Properties inherited from GgitNative (1)

###### Ggit.Native:native

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GgitDiffClass {
      /* no available fields */
    }

The class structure for `GgitDiffClass`.