From 37348937ff391f01981e8af10b2f615268fd2509 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 9 Jul 2010 07:10:53 -0600 Subject: merge-recursive: Fix D/F conflicts The D/F conflicts that can be automatically resolved (file or directory unmodified on one side of history), have the nice property that process_entry() can correctly handle all subpaths of the D/F conflict. In the case of D->F conversions, it will correctly delete all non-conflicting files below the relevant directory and the directory itself (note that both untracked and conflicting files below the directory will prevent its removal). So if we handle D/F conflicts after all other conflicts, they become fairly simple to handle -- we just need to check for whether or not a path (file/directory) is in the way of creating the new content. We do this by having process_entry() defer handling such entries to a subsequent process_df_entry() step. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t6035-merge-dir-to-symlink.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/t6035-merge-dir-to-symlink.sh b/t/t6035-merge-dir-to-symlink.sh index 761ad9d154..f6972bed06 100755 --- a/t/t6035-merge-dir-to-symlink.sh +++ b/t/t6035-merge-dir-to-symlink.sh @@ -56,7 +56,7 @@ test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolv test -f a/b-2/c/d ' -test_expect_failure 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' ' +test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' ' git reset --hard && git checkout baseline^0 && git merge -s recursive master && @@ -130,7 +130,7 @@ test_expect_success 'merge should not have D/F conflicts (resolve)' ' test -f a/b/c/d ' -test_expect_failure 'merge should not have D/F conflicts (recursive)' ' +test_expect_success 'merge should not have D/F conflicts (recursive)' ' git reset --hard && git checkout baseline^0 && git merge -s recursive test2 && @@ -138,7 +138,7 @@ test_expect_failure 'merge should not have D/F conflicts (recursive)' ' test -f a/b/c/d ' -test_expect_failure 'merge should not have F/D conflicts (recursive)' ' +test_expect_success 'merge should not have F/D conflicts (recursive)' ' git reset --hard && git checkout -b foo test2 && git merge -s recursive baseline^0 && -- cgit v1.2.3