git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jerry Zhang <jerry@skydio.com>
Cc: git@vger.kernel.org, newren@gmail.com, ross@skydio.com,
	abe@skydio.com, brian.kubisiak@skydio.com
Subject: Re: [PATCH] git-apply: try threeway first when "--3way" is used
Date: Mon, 05 Apr 2021 23:14:46 -0700	[thread overview]
Message-ID: <xmqq7dlg2b3d.fsf@gitster.g> (raw)
In-Reply-To: <20210406025551.25213-1-jerry@skydio.com> (Jerry Zhang's message of "Mon, 5 Apr 2021 19:55:51 -0700")

Jerry Zhang <jerry@skydio.com> 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

  parent reply	other threads:[~2021-04-06  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  2:55 Jerry Zhang
2021-04-06  6:13 ` Junio C Hamano
2021-04-06 23:13   ` Junio C Hamano
2021-04-06  6:14 ` Junio C Hamano [this message]
2021-04-06 23:25 ` Jerry Zhang
2021-04-07  0:19   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7dlg2b3d.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=abe@skydio.com \
    --cc=brian.kubisiak@skydio.com \
    --cc=git@vger.kernel.org \
    --cc=jerry@skydio.com \
    --cc=newren@gmail.com \
    --cc=ross@skydio.com \
    --subject='Re: [PATCH] git-apply: try threeway first when "--3way" is used' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).