Commit d1d0638a authored by Techlive Zheng's avatar Techlive Zheng
Browse files

Initial binding for git_diff_find_similar

Currently, use NULL as git_diff_find_options, which needs binding too.

https://bugzilla.gnome.org/show_bug.cgi?id=720127
parent b428e865
......@@ -314,6 +314,31 @@ ggit_diff_new_tree_to_workdir (GgitRepository *repository,
return _ggit_diff_wrap (diff, TRUE);
}
/**
* ggit_diff_find_similar:
* @diff: the #GgitDiff to work on.
* @error: a #GError for error reporting, or %NULL.
*
* Transform a @diff marking file renames, copies, etc.
*/
void
ggit_diff_find_similar (GgitDiff *diff,
GError **error)
{
gint ret;
g_return_if_fail (GGIT_IS_DIFF (diff));
g_return_if_fail (error == NULL || *error == NULL);
ret = git_diff_find_similar (_ggit_native_get (diff),
NULL);
if (ret != GIT_OK)
{
_ggit_error_set (error, ret);
}
}
/**
* ggit_diff_merge:
* @onto: the #GgitDiff to merge into.
......
......@@ -81,6 +81,9 @@ GgitDiff *ggit_diff_new_tree_to_workdir (GgitRepository *repos
GgitDiffOptions *diff_options,
GError **error);
void ggit_diff_find_similar (GgitDiff *diff,
GError **error);
void ggit_diff_merge (GgitDiff *onto,
GgitDiff *from,
GError **error);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment