From 4d3fe0c5f342d0b00209916cf6951c2f8db414d2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 6 Sep 2005 12:53:56 -0700 Subject: [PATCH] Add debugging help for case #16 to read-tree.c This will help us detect if real-world example merges have multiple merge-base candidates and one of them matches one head while another matches the other head. Signed-off-by: Junio C Hamano --- t/t1000-read-tree-m-3way.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 't') diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh index f1cd50cee9..c387e9ea08 100755 --- a/t/t1000-read-tree-m-3way.sh +++ b/t/t1000-read-tree-m-3way.sh @@ -218,6 +218,9 @@ currently implemented. or (2) match B. ------------------------------------------------------------------ 15 exists O==A O==B take B must match A if exists. + ------------------------------------------------------------------ + 16 exists O==A O==B barf must match A if exists. + *multi* in one in another ------------------------------------------------------------------- Note: if we want to implement 2ALT and 3ALT we need to be careful. @@ -514,4 +517,17 @@ test_expect_failure \ git-update-index --add NN && git-read-tree -m $tree_O $tree_A $tree_B" +# #16 +test_expect_success \ + '16 - A matches in one and B matches in another.' \ + 'rm -f .git/index F16 && + echo F16 >F16 && + git-update-index --add F16 && + tree0=`git-write-tree` && + echo E16 >F16 && + git-update-index F16 && + tree1=`git-write-tree` && + git-read-tree -m $tree0 $tree1 $tree1 $tree0 && + git-ls-files --stage' + test_done -- cgit v1.2.3