GgitDiffOptions: libgit2-glib Reference Manual

## GgitDiffOptions GgitDiffOptions |

## Functions

GgitDiffOptions * | ggit_diff_options_new ()
GgitDiffOption | ggit_diff_options_get_flags ()
void | ggit_diff_options_set_flags ()
gint | ggit_diff_options_get_n_context_lines ()
void | ggit_diff_options_set_n_context_lines ()
gint | ggit_diff_options_get_n_interhunk_lines ()
void | ggit_diff_options_set_n_interhunk_lines ()
const gchar * | ggit_diff_options_get_old_prefix ()
void | ggit_diff_options_set_old_prefix ()
const gchar * | ggit_diff_options_get_new_prefix ()
void | ggit_diff_options_set_new_prefix ()
const gchar ** | ggit_diff_options_get_pathspec ()
void | ggit_diff_options_set_pathspec ()

## Properties

GgitDiffOption | flags | Read / Write / Construct
gint | n-context-lines | Read / Write / Construct
gint | n-interhunk-lines | Read / Write / Construct
gchar * | new-prefix | Read / Write / Construct
gchar * | old-prefix | Read / Write / Construct
GStrv | pathspec | Read / Write / Construct

## Types and Values

| GgitDiffOptions
struct | GgitDiffOptionsClass

## Object Hierarchy

        GObject
        ╰── GgitDiffOptions

## Description

## Functions

### ggit_diff_options_new ()

    GgitDiffOptions *
    ggit_diff_options_new (void);

Create a new diff options object.

#### Returns

a GgitDiffOptions or `NULL`.

[transfer full][nullable]

### ggit_diff_options_get_flags ()

    GgitDiffOption
    ggit_diff_options_get_flags (GgitDiffOptions *options);

Get the diff flags.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

a GgitDiffOption.

### ggit_diff_options_set_flags ()

    void
    ggit_diff_options_set_flags (GgitDiffOptions *options,
                                 GgitDiffOption flags);

Set the diff flags.

#### Parameters

options | a GgitDiffOptions. |
flags | a GgitDiffOption. |

### ggit_diff_options_get_n_context_lines ()

    gint
    ggit_diff_options_get_n_context_lines (GgitDiffOptions *options);

Get the number of context lines to include in the diff.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

the number of context lines.

### ggit_diff_options_set_n_context_lines ()

    void
    ggit_diff_options_set_n_context_lines (GgitDiffOptions *options,
                                           gint n);

Set the number of context lines to include in the diff.

#### Parameters

options | a GgitDiffOptions. |
n | the number of lines. |

### ggit_diff_options_get_n_interhunk_lines ()

    gint
    ggit_diff_options_get_n_interhunk_lines
                                   (GgitDiffOptions *options);

Get the number of interhunk lines to include in the diff.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

the number of lines.

### ggit_diff_options_set_n_interhunk_lines ()

    void
    ggit_diff_options_set_n_interhunk_lines
                                   (GgitDiffOptions *options,
                                    gint n);

Set the number of interhunk lines to include in the diff.

#### Parameters

options | a GgitDiffOptions. |
n | the number of lines. |

### ggit_diff_options_get_old_prefix ()

    const gchar *
    ggit_diff_options_get_old_prefix (GgitDiffOptions *options);

Get the diff old-prefix string.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

the old-prefix string or `NULL`.

[transfer full][nullable]

### ggit_diff_options_set_old_prefix ()

    void
    ggit_diff_options_set_old_prefix (GgitDiffOptions *options,
                                      const gchar *prefix);

Get the diff old-prefix string.

#### Parameters

options | a GgitDiffOptions. |
prefix | the prefix. |

### ggit_diff_options_get_new_prefix ()

    const gchar *
    ggit_diff_options_get_new_prefix (GgitDiffOptions *options);

Get the diff new-prefix string.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

the new-prefix string or `NULL`.

[transfer none][nullable]

### ggit_diff_options_set_new_prefix ()

    void
    ggit_diff_options_set_new_prefix (GgitDiffOptions *options,
                                      const gchar *prefix);

Set the diff new-prefix string.

#### Parameters

options | a GgitDiffOptions. |
prefix | the prefix. |

### ggit_diff_options_get_pathspec ()

    const gchar **
    ggit_diff_options_get_pathspec (GgitDiffOptions *options);

Get the pathspec.

#### Parameters

options | a GgitDiffOptions. |

#### Returns

the pathspec or `NULL`.

[transfer none][array zero-terminated=1][nullable]

### ggit_diff_options_set_pathspec ()

    void
    ggit_diff_options_set_pathspec (GgitDiffOptions *options,
                                    const gchar **pathspec);

Set the pathspec.

#### Parameters

options | a GgitDiffOptions. |
pathspec | the pathspec. | [array zero-terminated=1][allow-none]

## Types and Values

### GgitDiffOptions

    typedef struct _GgitDiffOptions GgitDiffOptions;

Represents the options used when creating a GgitDiff.

### struct GgitDiffOptionsClass

    struct GgitDiffOptionsClass {
    	GObjectClass parent_class;
    };

## Property Details

### The `“flags”` property

      “flags”                    GgitDiffOption

Flags.

Flags: Read / Write / Construct

### The `“n-context-lines”` property

      “n-context-lines”          gint

N context lines.

Flags: Read / Write / Construct

Default value: 3

### The `“n-interhunk-lines”` property

      “n-interhunk-lines”        gint

N interhunk lines.

Flags: Read / Write / Construct

Default value: 0

### The `“new-prefix”` property

      “new-prefix”               gchar *

New prefix.

Flags: Read / Write / Construct

Default value: NULL

### The `“old-prefix”` property

      “old-prefix”               gchar *

Old prefix.

Flags: Read / Write / Construct

Default value: NULL

### The `“pathspec”` property

      “pathspec”                 GStrv

Pathspec.

Flags: Read / Write / Construct