From: Junio C Hamano Date: Tue, 09 Sep 2014 17:47:01 GMT Subject: Re: [PATCH v3 6/8] merge-recursive: allow storing conflict hunks in index Message-ID: In-Reply-To: <781fa77328ef04600c9ef7ad4f682e157c3aeefe.1409860234.git.tr@thomasrast.ch> Thomas Rast writes: > diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh > index be07705..39841a9 100755 > --- a/t/t3030-merge-recursive.sh > +++ b/t/t3030-merge-recursive.sh > @@ -310,6 +310,26 @@ test_expect_success 'merge-recursive --index-only' ' > test_cmp expected-diff actual-diff > ' > > +test_expect_success 'merge-recursive --index-only --conflicts-in-index' ' > + # first pass: do a merge as usual to obtain "expected" > + rm -fr [abcd] && > + git checkout -f "$c2" && > + test_expect_code 1 git merge-recursive "$c0" -- "$c2" "$c1" && > + git add [abcd] && > + git ls-files -s >expected && > + # second pass: actual test > + rm -fr [abcd] && > + git checkout -f "$c2" && > + test_expect_code 1 \ > + git merge-recursive --index-only --conflicts-in-index \ > + "$c0" -- "$c2" "$c1" && > + git ls-files -s >actual && > + test_cmp expected actual && At this point what is the expected output from "git diff-files"? > + git diff HEAD >actual-diff && > + : >expected-diff && > + test_cmp expected-diff actual-diff > +' > + > test_expect_success 'fail if the index has unresolved entries' ' > > rm -fr [abcd] &&