From f62c174d0d88c3e491fe3f4e3490959edb7cae1b Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 2 Dec 2013 13:49:58 -0800 Subject: [PATCH] GIT_DIFF_FIND_REMOVE_UNMODIFIED sounds better --- include/git2/diff.h | 4 ++-- src/diff_tform.c | 2 +- tests/diff/rename.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/git2/diff.h b/include/git2/diff.h index 51ad349e3..db6bce2eb 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -525,14 +525,14 @@ typedef enum { */ GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY = (1u << 15), - /** Delete any UNMODIFIED records after find_similar is done. + /** Remove any UNMODIFIED deltas after find_similar is done. * * Using GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED to emulate the * --find-copies-harder behavior requires building a diff with the * GIT_DIFF_INCLUDE_UNMODIFIED flag. If you do not want UNMODIFIED * records in the final result, pass this flag to have them removed. */ - GIT_DIFF_FIND_DELETE_UNMODIFIED = (1u << 16), + GIT_DIFF_FIND_REMOVE_UNMODIFIED = (1u << 16), } git_diff_find_t; /** diff --git a/src/diff_tform.c b/src/diff_tform.c index bff821dc3..0a28e58c7 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -746,7 +746,7 @@ static bool is_rename_source( case GIT_DELTA_UNMODIFIED: if (!FLAG_SET(opts, GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED)) return false; - if (FLAG_SET(opts, GIT_DIFF_FIND_DELETE_UNMODIFIED)) + if (FLAG_SET(opts, GIT_DIFF_FIND_REMOVE_UNMODIFIED)) delta->flags |= GIT_DIFF_FLAG__TO_DELETE; break; diff --git a/tests/diff/rename.c b/tests/diff/rename.c index e081d616f..919f5139a 100644 --- a/tests/diff/rename.c +++ b/tests/diff/rename.c @@ -1365,7 +1365,7 @@ void test_diff_rename__can_delete_unmodified_deltas(void) cl_assert_equal_i(1, exp.file_status[GIT_DELTA_MODIFIED]); cl_assert_equal_i(3, exp.file_status[GIT_DELTA_UNMODIFIED]); - opts.flags = GIT_DIFF_FIND_ALL | GIT_DIFF_FIND_DELETE_UNMODIFIED; + opts.flags = GIT_DIFF_FIND_ALL | GIT_DIFF_FIND_REMOVE_UNMODIFIED; cl_git_pass(git_diff_find_similar(diff, &opts)); memset(&exp, 0, sizeof(exp));