Subject: Re: [PATCH v3 6/8] merge-recursive: allow storing conflict hunks in index

From: Junio C Hamano <[email-masked]>
Date: Tue, 09 Sep 2014 10:47:01 -0700

Thomas Rast <[email-masked]> 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] &&