diff options
author | Russell Belfer <rb@github.com> | 2012-10-30 09:40:50 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-30 09:40:50 -0700 |
commit | db106d01f093b3e61170e3738d6651a2866cb76e (patch) | |
tree | 0028e57a8490841e60f7b84ce2a3abe0634d54c3 /tests-clar/diff/rename.c | |
parent | b4f5bb074721823cc016b66a9984abe2c271cb1f (diff) | |
download | libgit2-db106d01f093b3e61170e3738d6651a2866cb76e.tar.gz |
Move rename detection into new file
This improves the naming for the rename related functionality
moving it to be called `git_diff_find_similar()` and renaming
all the associated constants, etc. to make more sense.
I also moved the new code (plus the existing `git_diff_merge`)
into a new file `diff_tform.c` where I can put new functions
related to manipulating git diff lists.
This also updates the implementation significantly from the
last revision fixing some ordering issues (where break-rewrite
needs to be handled prior to copy and rename detection) and
improving config option handling.
Diffstat (limited to 'tests-clar/diff/rename.c')
-rw-r--r-- | tests-clar/diff/rename.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests-clar/diff/rename.c b/tests-clar/diff/rename.c index 8a50fd5ea..0ee1db842 100644 --- a/tests-clar/diff/rename.c +++ b/tests-clar/diff/rename.c @@ -34,14 +34,14 @@ void test_diff_rename__match_oid(void) git_tree *old_tree, *new_tree; git_diff_list *diff; git_diff_options diffopts = {0}; - git_diff_detect_options opts; + git_diff_find_options opts; diff_expects exp; old_tree = resolve_commit_oid_to_tree(g_repo, old_sha); new_tree = resolve_commit_oid_to_tree(g_repo, new_sha); /* Must pass GIT_DIFF_INCLUDE_UNMODIFIED if you expect to emulate - * --find-copies-harder during rename detection... + * --find-copies-harder during rename transformion... */ memset(&diffopts, 0, sizeof(diffopts)); diffopts.flags |= GIT_DIFF_INCLUDE_UNMODIFIED; @@ -65,7 +65,7 @@ void test_diff_rename__match_oid(void) /* git diff 31e47d8c1fa36d7f8d537b96158e3f024de0a9f2 \ * 2bc7f351d20b53f1c72c16c4b036e491c478c49a */ - cl_git_pass(git_diff_detect(diff, NULL)); + cl_git_pass(git_diff_find_similar(diff, NULL)); memset(&exp, 0, sizeof(exp)); cl_git_pass(git_diff_foreach( @@ -86,8 +86,8 @@ void test_diff_rename__match_oid(void) * 2bc7f351d20b53f1c72c16c4b036e491c478c49a */ memset(&opts, 0, sizeof(opts)); - opts.flags = GIT_DIFF_DETECT_COPIES_FROM_UNMODIFIED; - cl_git_pass(git_diff_detect(diff, &opts)); + opts.flags = GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED; + cl_git_pass(git_diff_find_similar(diff, &opts)); memset(&exp, 0, sizeof(exp)); cl_git_pass(git_diff_foreach( |