diff options
-rw-r--r-- | merge-recursive.c | 4 | ||||
-rwxr-xr-x | t/t6043-merge-rename-directories.sh | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 4a1ecdea03..5f42c677d5 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2763,7 +2763,6 @@ static int merge_content(struct merge_options *o, if (mfi.clean && !df_conflict_remains && oid_eq(&mfi.oid, a_oid) && mfi.mode == a_mode) { - int path_renamed_outside_HEAD; output(o, 3, _("Skipped %s (merged same as existing)"), path); /* * The content merge resulted in the same file contents we @@ -2771,8 +2770,7 @@ static int merge_content(struct merge_options *o, * are recorded at the correct path (which may not be true * if the merge involves a rename). */ - path_renamed_outside_HEAD = !path2 || !strcmp(path, path2); - if (!path_renamed_outside_HEAD) { + if (was_tracked(path)) { add_cacheinfo(o, mfi.mode, &mfi.oid, path, 0, (!o->call_depth), 0); return mfi.clean; diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 45f620633f..2e28f2908d 100755 --- a/t/t6043-merge-rename-directories.sh +++ b/t/t6043-merge-rename-directories.sh @@ -3884,7 +3884,7 @@ test_expect_success '12b-setup: Moving one directory hierarchy into another' ' ) ' -test_expect_failure '12b-check: Moving one directory hierarchy into another' ' +test_expect_success '12b-check: Moving one directory hierarchy into another' ' ( cd 12b && |