GgitDiffHunk

## GgitDiffHunk GgitDiffHunk |

## Functions

const gchar * | ggit_diff_hunk_get_header ()
gint | ggit_diff_hunk_get_new_lines ()
gint | ggit_diff_hunk_get_new_start ()
gint | ggit_diff_hunk_get_old_lines ()
gint | ggit_diff_hunk_get_old_start ()
GgitDiffHunk * | ggit_diff_hunk_ref ()
void | ggit_diff_hunk_unref ()

## Types and Values

| GgitDiffHunk

## Object Hierarchy

        GBoxed
        ╰── GgitDiffHunk

## Description

## Functions

### ggit_diff_hunk_get_header ()

    const gchar *
    ggit_diff_hunk_get_header (GgitDiffHunk *hunk);

### ggit_diff_hunk_get_new_lines ()

    gint
    ggit_diff_hunk_get_new_lines (GgitDiffHunk *hunk);

Gets the number of lines in the new file.

#### Parameters

hunk | a GgitDiffHunk. |

#### Returns

the number of lines in the new file.

### ggit_diff_hunk_get_new_start ()

    gint
    ggit_diff_hunk_get_new_start (GgitDiffHunk *hunk);

Gets the starting line number in the new file.

#### Parameters

hunk | a GgitDiffHunk. |

#### Returns

the starting line number in the new file.

### ggit_diff_hunk_get_old_lines ()

    gint
    ggit_diff_hunk_get_old_lines (GgitDiffHunk *hunk);

Gets the number of lines in the old file.

#### Parameters

hunk | a GgitDiffHunk. |

#### Returns

the number of lines in the old file.

### ggit_diff_hunk_get_old_start ()

    gint
    ggit_diff_hunk_get_old_start (GgitDiffHunk *hunk);

Gets the starting line number in the old file.

#### Parameters

hunk | a GgitDiffHunk. |

#### Returns

the starting line number in the old file.

### ggit_diff_hunk_ref ()

    GgitDiffHunk *
    ggit_diff_hunk_ref (GgitDiffHunk *hunk);

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

#### Parameters

hunk | a GgitDiffHunk. |

#### Returns

a GgitDiffHunk.

### ggit_diff_hunk_unref ()

    void
    ggit_diff_hunk_unref (GgitDiffHunk *hunk);

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

#### Parameters

hunk | a GgitDiffHunk. |

## Types and Values

### GgitDiffHunk

    typedef struct _GgitDiffHunk GgitDiffHunk;

Represents the hunk of a diff.