GgitMergeOptions: libgit2-glib Reference Manual

## GgitMergeOptions GgitMergeOptions |

## Functions

GgitMergeOptions * | ggit_merge_options_copy ()
void | ggit_merge_options_free ()
GgitMergeOptions * | ggit_merge_options_new ()
void | ggit_merge_options_set_rename_threshold ()
guint | ggit_merge_options_get_rename_threshold ()
void | ggit_merge_options_set_target_limit ()
guint | ggit_merge_options_get_target_limit ()
void | ggit_merge_options_set_similarity_metric ()
GgitDiffSimilarityMetric * | ggit_merge_options_get_similarity_metric ()
void | ggit_merge_options_set_file_favor ()
GgitMergeFileFavor | ggit_merge_options_get_file_favor ()
void | ggit_merge_options_set_file_flags ()
GgitMergeFileFlags | ggit_merge_options_get_file_flags ()

## Description

## Functions

### ggit_merge_options_copy ()

    GgitMergeOptions *
    ggit_merge_options_copy (GgitMergeOptions *merge_options);

Copies `merge_options` into a newly allocated GgitMergeOptions.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

a newly allocated GgitMergeOptions.

[transfer full]

### ggit_merge_options_free ()

    void
    ggit_merge_options_free (GgitMergeOptions *merge_options);

Frees `merge_options` .

#### Parameters

merge_options | a GgitMergeOptions. |

### ggit_merge_options_new ()

    GgitMergeOptions *
    ggit_merge_options_new (void);

Creates a new GgitMergeOptions.

#### Returns

a newly allocated GgitMergeOptions.

### ggit_merge_options_set_rename_threshold ()

    void
    ggit_merge_options_set_rename_threshold
                                   (GgitMergeOptions *merge_options,
                                    guint rename_threshold);

Set the rename threshold (defaults to 50). If `GGIT_MERGE_TREE_FIND_RENAMES` is enabled, added files will be compared with deleted files to determine their similarity. Files that are more similar than the rename threshold (percentage-wise) will be treated as a rename.

#### Parameters

merge_options | a GgitMergeOptions. |
rename_threshold | similarity to consider a file renamed. |

### ggit_merge_options_get_rename_threshold ()

    guint
    ggit_merge_options_get_rename_threshold
                                   (GgitMergeOptions *merge_options);

Get the rename threshold (defaults to 50). If `GGIT_MERGE_TREE_FIND_RENAMES` is enabled, added files will be compared with deleted files to determine their similarity. Files that are more similar than the rename threshold (percentage-wise) will be treated as a rename.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

the rename threshold.

### ggit_merge_options_set_target_limit ()

    void
    ggit_merge_options_set_target_limit (GgitMergeOptions *merge_options,
                                         guint target_limit);

Set the maximum number of similarity sources to examine for renames (defaults to 200). If the number of rename candidates (add / delete pairs) is greater than this value, inexact rename detection is aborted.

#### Parameters

merge_options | a GgitMergeOptions. |
target_limit | maximum similarity source to examine for renames. |

### ggit_merge_options_get_target_limit ()

    guint
    ggit_merge_options_get_target_limit (GgitMergeOptions *merge_options);

Get the maximum number of similarity sources to examine for renames (defaults to 200). If the number of rename candidates (add / delete pairs) is greater than this value, inexact rename detection is aborted.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

the target limit.

### ggit_merge_options_set_similarity_metric ()

    void
    ggit_merge_options_set_similarity_metric
                                   (GgitMergeOptions *merge_options,
                                    GgitDiffSimilarityMetric *metric);

Set the similarity metric, or `NULL` for the default similarity metric.

#### Parameters

merge_options | a GgitMergeOptions. |
metric | a GgitSimilarityMetric. |

### ggit_merge_options_get_similarity_metric ()

    GgitDiffSimilarityMetric *
    ggit_merge_options_get_similarity_metric
                                   (GgitMergeOptions *merge_options);

Get the similarity metric.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

the similarity metric, or `NULL`.

[transfer none]

### ggit_merge_options_set_file_favor ()

    void
    ggit_merge_options_set_file_favor (GgitMergeOptions *merge_options,
                                       GgitMergeFileFavor file_favor);

Set flags for handling conflicting content.

#### Parameters

merge_options | a GgitMergeOptions. |
file_favor | the file favor. |

### ggit_merge_options_get_file_favor ()

    GgitMergeFileFavor
    ggit_merge_options_get_file_favor (GgitMergeOptions *merge_options);

Get flags for handling conflicting content.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

the file favor.

### ggit_merge_options_set_file_flags ()

    void
    ggit_merge_options_set_file_flags (GgitMergeOptions *merge_options,
                                       GgitMergeFileFlags file_flags);

Set file merging flags.

#### Parameters

merge_options | a GgitMergeOptions. |
file_flags | the file flags. |

### ggit_merge_options_get_file_flags ()

    GgitMergeFileFlags
    ggit_merge_options_get_file_flags (GgitMergeOptions *merge_options);

Get file merging flags.

#### Parameters

merge_options | a GgitMergeOptions. |

#### Returns

the file merging flags.

## Types and Values