git_diff_find_options

Control behavior of rename and copy detection

These options mostly mimic parameters that can be passed to git-diff.

Members

Variables

break_rewrite_threshold
ushort break_rewrite_threshold;

Treshold below which similar files will be split into a delete/add pair. This is equivalent to the last part of the -B option. Defaults to 60.

copy_threshold
ushort copy_threshold;

Threshold above which similar files will be considered copies. This is equivalent to the -C option. Defaults to 50.

flags
uint flags;

Combination of git_diff_find_t values (default git_diff_find_t.GIT_DIFF_FIND_BY_CONFIG). NOTE: if you don't explicitly set this, diff.renames could be set to false, resulting in git_diff_find_similar doing nothing.

metric
.git_diff_similarity_metric* metric;

The metric option allows you to plug in a custom similarity metric.

rename_from_rewrite_threshold
ushort rename_from_rewrite_threshold;

Threshold below which similar files will be eligible to be a rename source. This is equivalent to the first part of the -B option. Defaults to 50.

rename_limit
size_t rename_limit;

Maximum number of matches to consider for a particular file.

rename_threshold
ushort rename_threshold;

Threshold above which similar files will be considered renames. This is equivalent to the -M option. Defaults to 50.

version_
uint version_;
Undocumented in source.

Meta