Re: [PATCH] git-apply: try threeway first when "--3way" is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jerry Zhang <jerry@xxxxxxxxxx> writes:

> diff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh
> index d62db3fbe16f35a625a4a14eebb70034f695d3eb..0a7332fed5f60a8a2c9c25fc6713d513c3f0ace1 100755
> --- a/t/t4108-apply-threeway.sh
> +++ b/t/t4108-apply-threeway.sh
> @@ -160,4 +160,24 @@ test_expect_success 'apply -3 with add/add conflict (dirty working tree)' '
>  	test_cmp three.save three
>  '
>  
> +test_expect_success 'apply -3 with ambiguous repeating file' '
> +	git reset --hard &&
> +	test_write_lines 1 2 1 2 1 2 1 2 1 2 1>one_two_repeat &&

Missing SP before '>' (same issue on other redirections below).

> +	git add one_two_repeat &&
> +	git commit -m "init one" &&
> +	test_write_lines 1 2 1 2 1 2 1 2 one 2 1>one_two_repeat &&
> +	git commit -a -m "change one" &&
> +
> +	git diff HEAD~ >Repeat.diff &&
> +	git reset --hard HEAD~ &&
> +
> +	test_write_lines 1 2 1 2 1 2 one 2 1 2 one>one_two_repeat &&
> +	git commit -a -m "change surrounding one" &&
> +
> +	git apply --index --3way Repeat.diff &&
> +	test_write_lines 1 2 1 2 1 2 one 2 one 2 one>expect &&
> +
> +	test_cmp expect one_two_repeat
> +'
> +
>  test_done



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux