git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Cc: "David Aguilar" <davvid@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Sergey Organov" <sorganov@gmail.com>,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Elijah Newren" <newren@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Denton Liu" <liu.denton@gmail.com>
Subject: Re: [PATCH 7/7] xdiff: make diff3 the default conflictStyle
Date: Thu, 10 Jun 2021 10:40:51 +0100	[thread overview]
Message-ID: <bddfe587-704c-a7b2-1182-246226aa09ba@gmail.com> (raw)
In-Reply-To: <20210609192842.696646-8-felipe.contreras@gmail.com>

On 09/06/2021 20:28, Felipe Contreras wrote:
> Virtually everyone is using it, and it's one of the first things we
> teach newcomers in order to resolve conflicts efficiently.

Given there are millions of users I'm not sure how you established that 
virtually everyone is using it. I think that while this change would be 
useful to some users (though not many if virtually everyone already has 
it set) it has the potential to annoy a lot of users who are happy with 
the existing default. I do not think that it is a positive change over all.

Had the default been diff3 from early on in git's history then I would 
not advocate changing it to the current default but I think the time has 
passed when it can be changed without inconveniencing existing users.

The patches up to this point have useful fixes in them which would 
improve git, thanks for working on them.

Best Wishes

Phillip

> Let's make it the default.
> 
> This generates a ton of changes in the tests. Although we probably will
> want to update them to use th new default, override the configuration so
> we use the old one for now.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>   Documentation/config/merge.txt           | 12 +++++-----
>   Documentation/git-merge-file.txt         |  2 ++
>   Documentation/git-merge.txt              | 28 +++++++-----------------
>   Documentation/git-rerere.txt             |  2 +-
>   Documentation/gitattributes.txt          |  6 ++---
>   Documentation/technical/rerere.txt       |  3 +--
>   Documentation/user-manual.txt            |  6 ++++-
>   t/t2023-checkout-m.sh                    |  2 ++
>   t/t3310-notes-merge-manual-resolve.sh    |  2 ++
>   t/t3311-notes-merge-fanout.sh            |  2 ++
>   t/t3404-rebase-interactive.sh            |  2 ++
>   t/t3507-cherry-pick-conflict.sh          |  2 ++
>   t/t4017-diff-retval.sh                   |  2 ++
>   t/t4048-diff-combined-binary.sh          |  2 ++
>   t/t4200-rerere.sh                        |  2 ++
>   t/t4300-merge-tree.sh                    |  2 ++
>   t/t6402-merge-rename.sh                  |  2 ++
>   t/t6403-merge-file.sh                    |  2 ++
>   t/t6404-recursive-merge.sh               |  2 ++
>   t/t6416-recursive-corner-cases.sh        |  2 ++
>   t/t6417-merge-ours-theirs.sh             |  2 ++
>   t/t6418-merge-text-auto.sh               |  2 ++
>   t/t6422-merge-rename-corner-cases.sh     |  2 ++
>   t/t6423-merge-rename-directories.sh      |  1 +
>   t/t6428-merge-conflicts-sparse.sh        |  1 +
>   t/t6432-merge-recursive-space-options.sh |  2 ++
>   t/t6440-config-conflict-markers.sh       |  8 +++----
>   t/t7201-co.sh                            |  2 ++
>   t/t7506-status-submodule.sh              |  1 +
>   xdiff-interface.c                        |  2 +-
>   30 files changed, 70 insertions(+), 38 deletions(-)
> 
> diff --git a/Documentation/config/merge.txt b/Documentation/config/merge.txt
> index cb2ed58907..2dba937dd0 100644
> --- a/Documentation/config/merge.txt
> +++ b/Documentation/config/merge.txt
> @@ -1,10 +1,10 @@
>   merge.conflictStyle::
> -	Specify the style in which conflicted hunks are written out to
> -	working tree files upon merge.  The default is "merge", which
> -	shows a `<<<<<<<` conflict marker, changes made by one side,
> -	a `=======` marker, changes made by the other side, and then
> -	a `>>>>>>>` marker.  An alternate style, "diff3", adds a `|||||||`
> -	marker and the original text before the `=======` marker.
> +	Specify the style in which conflicted hunks are written out to working
> +	tree files upon merge. The default is "diff3", which shows a `<<<<<<<`
> +	conflict marker, changes made by one side, a `|||||||` marker, the
> +	original text, a `=======` marker, changes made by the other side, and
> +	then a `>>>>>>>` marker. A simpler mode "merge" omits the `|||||||`
> +	marker and the original text.
>   
>   merge.defaultToUpstream::
>   	If merge is called without any commit argument, merge the upstream
> diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt
> index f856032613..7d8e74c872 100644
> --- a/Documentation/git-merge-file.txt
> +++ b/Documentation/git-merge-file.txt
> @@ -30,6 +30,8 @@ normally outputs a warning and brackets the conflict with lines containing
>   
>   	<<<<<<< A
>   	lines in file A
> +	|||||||
> +	lines in merge base
>   	=======
>   	lines in file B
>   	>>>>>>> B
> diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
> index 3819fadac1..14dadf2e16 100644
> --- a/Documentation/git-merge.txt
> +++ b/Documentation/git-merge.txt
> @@ -233,7 +233,7 @@ final result verbatim.  When both sides made changes to the same area,
>   however, Git cannot randomly pick one side over the other, and asks you to
>   resolve it by leaving what both sides did to that area.
>   
> -By default, Git uses the same style as the one used by the "merge" program
> +By default, Git uses a similar style to the one used by the "merge" program
>   from the RCS suite to present such a conflicted hunk, like this:
>   
>   ------------
> @@ -242,6 +242,8 @@ ancestor, or cleanly resolved because only one side changed.
>   <<<<<<< yours:sample.txt
>   Conflict resolution is hard;
>   let's go shopping.
> +|||||||
> +Originally there's no conflict.
>   =======
>   Git makes conflict resolution easy.
>   >>>>>>> theirs:sample.txt
> @@ -249,17 +251,12 @@ And here is another line that is cleanly resolved or unmodified.
>   ------------
>   
>   The area where a pair of conflicting changes happened is marked with markers
> -`<<<<<<<`, `=======`, and `>>>>>>>`.  The part before the `=======`
> -is typically your side, and the part afterwards is typically their side.
> -
> -The default format does not show what the original said in the conflicting
> -area.  You cannot tell how many lines are deleted and replaced with
> -Barbie's remark on your side.  The only thing you can tell is that your
> -side wants to say it is hard and you'd prefer to go shopping, while the
> -other side wants to claim it is easy.
> +`<<<<<<<`, `=======`, and `>>>>>>>`.  The part before the `|||||||`
> +is typically your side, and the part after `=======` is typically their side.
> +In-between is the original code.
>   
> -An alternative style can be used by setting the "merge.conflictStyle"
> -configuration variable to "diff3".  In "diff3" style, the above conflict
> +An more basic style can be used by setting the "merge.conflictStyle"
> +configuration variable to "merge".  In "merge" style, the above conflict
>   may look like this:
>   
>   ------------
> @@ -268,21 +265,12 @@ ancestor, or cleanly resolved because only one side changed.
>   <<<<<<< yours:sample.txt
>   Conflict resolution is hard;
>   let's go shopping.
> -|||||||
> -Conflict resolution is hard.
>   =======
>   Git makes conflict resolution easy.
>   >>>>>>> theirs:sample.txt
>   And here is another line that is cleanly resolved or unmodified.
>   ------------
>   
> -In addition to the `<<<<<<<`, `=======`, and `>>>>>>>` markers, it uses
> -another `|||||||` marker that is followed by the original text.  You can
> -tell that the original just stated a fact, and your side simply gave in to
> -that statement and gave up, while the other side tried to have a more
> -positive attitude.  You can sometimes come up with a better resolution by
> -viewing the original.
> -
>   
>   HOW TO RESOLVE CONFLICTS
>   ------------------------
> diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt
> index 4cfc883378..89b0820995 100644
> --- a/Documentation/git-rerere.txt
> +++ b/Documentation/git-rerere.txt
> @@ -159,7 +159,7 @@ resolve.
>   
>   Running the 'git rerere' command immediately after a conflicted
>   automerge records the conflicted working tree files, with the
> -usual conflict markers `<<<<<<<`, `=======`, and `>>>>>>>` in
> +usual conflict markers `<<<<<<<`, `|||||||`, `=======`, and `>>>>>>>` in
>   them.  Later, after you are done resolving the conflicts,
>   running 'git rerere' again will record the resolved state of these
>   files.  Suppose you did this when you created the test merge of
> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index 83fd4e19a4..b767215ac2 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -1042,10 +1042,10 @@ text::
>   
>   	Usual 3-way file level merge for text files.  Conflicted
>   	regions are marked with conflict markers `<<<<<<<`,
> -	`=======` and `>>>>>>>`.  The version from your branch
> -	appears before the `=======` marker, and the version
> +	`|||||||`, `=======` and `>>>>>>>`.  The version from your branch
> +	appears before the `|||||||` marker, and the version
>   	from the merged branch appears after the `=======`
> -	marker.
> +	marker. In-between is the original.
>   
>   binary::
>   
> diff --git a/Documentation/technical/rerere.txt b/Documentation/technical/rerere.txt
> index af5f9fc24f..38b44f4430 100644
> --- a/Documentation/technical/rerere.txt
> +++ b/Documentation/technical/rerere.txt
> @@ -42,8 +42,7 @@ get a conflict like the following:
>       >>>>>>> AC
>   
>   Doing the analogous with AC2 (forking a branch ABAC2 off of branch AB
> -and then merging branch AC2 into it), using the diff3 conflict style,
> -we get a conflict like the following:
> +and then merging branch AC2 into it), we get a conflict like the following:
>   
>       <<<<<<< HEAD
>       B
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index f9e54b8674..3ddde87482 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1243,6 +1243,8 @@ files with conflicts will have conflict markers added, like this:
>   -------------------------------------------------
>   <<<<<<< HEAD:file.txt
>   Hello world
> +|||||||
> +Original
>   =======
>   Goodbye
>   >>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt
> @@ -1276,9 +1278,11 @@ diff --cc file.txt
>   index 802992c,2b60207..0000000
>   --- a/file.txt
>   +++ b/file.txt
> -@@@ -1,1 -1,1 +1,5 @@@
> +@@@ -1,1 -1,1 +1,7 @@@
>   ++<<<<<<< HEAD:file.txt
>    +Hello world
> +++|||||||
> +++Original
>   ++=======
>   + Goodbye
>   ++>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt
> diff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh
> index 7b327b7544..219c82532a 100755
> --- a/t/t2023-checkout-m.sh
> +++ b/t/t2023-checkout-m.sh
> @@ -9,6 +9,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success setup '
>   	test_tick &&
>   	test_commit both.txt both.txt initial &&
> diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh
> index d3d72e25fe..cbd5d8302e 100755
> --- a/t/t3310-notes-merge-manual-resolve.sh
> +++ b/t/t3310-notes-merge-manual-resolve.sh
> @@ -7,6 +7,8 @@ test_description='Test notes merging with manual conflict resolution'
>   
>   . ./test-lib.sh
>   
> +git config --global merge.conflictstyle merge # TODO: use the default
> +
>   # Set up a notes merge scenario with different kinds of conflicts
>   test_expect_success 'setup commits' '
>   	test_commit 1st &&
> diff --git a/t/t3311-notes-merge-fanout.sh b/t/t3311-notes-merge-fanout.sh
> index 5b675417e9..4aeaa05c15 100755
> --- a/t/t3311-notes-merge-fanout.sh
> +++ b/t/t3311-notes-merge-fanout.sh
> @@ -7,6 +7,8 @@ test_description='Test notes merging at various fanout levels'
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   verify_notes () {
>   	notes_ref="$1"
>   	commit="$2"
> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
> index 66bcbbf952..769079a71c 100755
> --- a/t/t3404-rebase-interactive.sh
> +++ b/t/t3404-rebase-interactive.sh
> @@ -32,6 +32,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . "$TEST_DIRECTORY"/lib-rebase.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success 'setup' '
>   	git switch -C primary &&
>   	test_commit A file1 &&
> diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
> index 014001b8f3..647a40f314 100755
> --- a/t/t3507-cherry-pick-conflict.sh
> +++ b/t/t3507-cherry-pick-conflict.sh
> @@ -281,6 +281,7 @@ test_expect_success \
>   
>   test_expect_success 'failed cherry-pick describes conflict in work tree' '
>   	pristine_detach initial &&
> +	git config merge.conflictstyle merge && # TODO: use the default
>   	cat <<-EOF >expected &&
>   	<<<<<<< HEAD
>   	a
> @@ -316,6 +317,7 @@ test_expect_success 'diff3 -m style' '
>   
>   test_expect_success 'revert also handles conflicts sanely' '
>   	git config --unset merge.conflictstyle &&
> +	git config merge.conflictstyle merge && # TODO: use the default
>   	pristine_detach initial &&
>   	cat <<-EOF >expected &&
>   	<<<<<<< HEAD
> diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
> index ed461f481e..04b77af2a4 100755
> --- a/t/t4017-diff-retval.sh
> +++ b/t/t4017-diff-retval.sh
> @@ -7,6 +7,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success 'setup' '
>   	echo "1 " >a &&
>   	git add . &&
> diff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh
> index 0260cf64f5..49a56731dd 100755
> --- a/t/t4048-diff-combined-binary.sh
> +++ b/t/t4048-diff-combined-binary.sh
> @@ -6,6 +6,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success 'setup binary merge conflict' '
>   	echo oneQ1 | q_to_nul >binary &&
>   	git add binary &&
> diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
> index 9f8c76dffb..e9ae3d6fde 100755
> --- a/t/t4200-rerere.sh
> +++ b/t/t4200-rerere.sh
> @@ -27,6 +27,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success 'setup' '
>   	cat >a1 <<-\EOF &&
>   	Some title
> diff --git a/t/t4300-merge-tree.sh b/t/t4300-merge-tree.sh
> index e59601e5fe..f21ccaf0a6 100755
> --- a/t/t4300-merge-tree.sh
> +++ b/t/t4300-merge-tree.sh
> @@ -6,6 +6,8 @@
>   test_description='git merge-tree'
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success setup '
>   	test_commit "initial" "initial-file" "initial"
>   '
> diff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh
> index 425dad97d5..4f01bbc451 100755
> --- a/t/t6402-merge-rename.sh
> +++ b/t/t6402-merge-rename.sh
> @@ -270,6 +270,7 @@ test_expect_success 'setup for rename + d/f conflicts' '
>   	git checkout --orphan dir-in-way &&
>   	git rm -rf . &&
>   	git clean -fdqx &&
> +	git config merge.conflictstyle merge && # TODO: use the default
>   
>   	mkdir sub &&
>   	mkdir dir &&
> @@ -871,6 +872,7 @@ test_expect_success 'setup for use of extended merge markers' '
>   	git clean -fdqx &&
>   	rm -rf .git &&
>   	git init &&
> +	git config merge.conflictstyle merge && # TODO: use the default
>   
>   	printf "1\n2\n3\n4\n5\n6\n7\n8\n" >original_file &&
>   	git add original_file &&
> diff --git a/t/t6403-merge-file.sh b/t/t6403-merge-file.sh
> index 2f421d967a..1428dfb5c6 100755
> --- a/t/t6403-merge-file.sh
> +++ b/t/t6403-merge-file.sh
> @@ -3,6 +3,8 @@
>   test_description='RCS merge replacement: merge-file'
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success 'setup' '
>   	cat >orig.txt <<-\EOF &&
>   	Dominus regit me,
> diff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh
> index eaf48e941e..a3354b8f9a 100755
> --- a/t/t6404-recursive-merge.sh
> +++ b/t/t6404-recursive-merge.sh
> @@ -6,6 +6,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   # This scenario is based on a real-world repository of Shawn Pearce.
>   
>   # 1 - A - D - F
> diff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh
> index 84f5082366..ac4e69a325 100755
> --- a/t/t6416-recursive-corner-cases.sh
> +++ b/t/t6416-recursive-corner-cases.sh
> @@ -8,6 +8,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   . ./test-lib.sh
>   . "$TEST_DIRECTORY"/lib-merge.sh
>   
> +git config --global merge.conflictstyle merge # TODO: use the default
> +
>   #
>   #  L1  L2
>   #   o---o
> diff --git a/t/t6417-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh
> index ac9aee9a66..b8208a383b 100755
> --- a/t/t6417-merge-ours-theirs.sh
> +++ b/t/t6417-merge-ours-theirs.sh
> @@ -6,6 +6,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_expect_success setup '
>   	for i in 1 2 3 4 5 6 7 8 9
>   	do
> diff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh
> index 1e0296dd17..e18f67776c 100755
> --- a/t/t6418-merge-text-auto.sh
> +++ b/t/t6418-merge-text-auto.sh
> @@ -17,6 +17,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
>   
>   compare_files () {
> diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
> index bf4ce3c63d..6bb4b6d968 100755
> --- a/t/t6422-merge-rename-corner-cases.sh
> +++ b/t/t6422-merge-rename-corner-cases.sh
> @@ -9,6 +9,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   . ./test-lib.sh
>   . "$TEST_DIRECTORY"/lib-merge.sh
>   
> +git config --global merge.conflictstyle merge # TODO: use the default
> +
>   test_setup_rename_delete_untracked () {
>   	test_create_repo rename-delete-untracked &&
>   	(
> diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh
> index 7134769149..5f6cacd064 100755
> --- a/t/t6423-merge-rename-directories.sh
> +++ b/t/t6423-merge-rename-directories.sh
> @@ -28,6 +28,7 @@ test_description="recursive merge with directory renames"
>   . ./test-lib.sh
>   . "$TEST_DIRECTORY"/lib-merge.sh
>   
> +git config --global merge.conflictstyle merge # TODO: use the default
>   
>   ###########################################################################
>   # SECTION 1: Basic cases we should be able to handle
> diff --git a/t/t6428-merge-conflicts-sparse.sh b/t/t6428-merge-conflicts-sparse.sh
> index 7e8bf497f8..18975801db 100755
> --- a/t/t6428-merge-conflicts-sparse.sh
> +++ b/t/t6428-merge-conflicts-sparse.sh
> @@ -25,6 +25,7 @@ test_description="merge cases"
>   . ./test-lib.sh
>   . "$TEST_DIRECTORY"/lib-merge.sh
>   
> +git config --global merge.conflictstyle merge # TODO: use the default
>   
>   # Testcase basic, conflicting changes in 'numerals'
>   
> diff --git a/t/t6432-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh
> index db4b77e63d..5cfe8a4fbd 100755
> --- a/t/t6432-merge-recursive-space-options.sh
> +++ b/t/t6432-merge-recursive-space-options.sh
> @@ -16,6 +16,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
>   if test_have_prereq GREP_STRIPS_CR
>   then
> diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh
> index 485ad0eee0..ae0bab37ad 100755
> --- a/t/t6440-config-conflict-markers.sh
> +++ b/t/t6440-config-conflict-markers.sh
> @@ -29,7 +29,7 @@ test_expect_success 'merge' '
>   		git commit -a -m left &&
>   
>   		test_must_fail git merge r &&
> -		! grep -E "\|+" content &&
> +		grep -E "\|+" content &&
>   
>   		git reset --hard &&
>   		test_must_fail git -c merge.conflictstyle=diff3 merge r &&
> @@ -52,7 +52,7 @@ test_expect_success 'merge-tree' '
>   		test_commit l content l &&
>   
>   		git merge-tree initial r l >actual &&
> -		! grep -E "\|+" actual &&
> +		grep -E "\|+" actual &&
>   
>   		git -c merge.conflictstyle=diff3 merge-tree initial r l >actual &&
>   		grep -E "\|+" actual &&
> @@ -77,7 +77,7 @@ test_expect_success 'notes' '
>   		git notes add -f -m l initial &&
>   
>   		test_must_fail git notes merge r &&
> -		! grep -E "\|+" .git/NOTES_MERGE_WORKTREE/* &&
> +		grep -E "\|+" .git/NOTES_MERGE_WORKTREE/* &&
>   
>   		git notes merge --abort &&
>   		test_must_fail git -c merge.conflictstyle=diff3 notes merge r &&
> @@ -104,7 +104,7 @@ test_expect_success 'checkout' '
>   
>   		fill b d >content &&
>   		git checkout --merge master &&
> -		! grep -E "\|+" content &&
> +		grep -E "\|+" content &&
>   
>   		git config merge.conflictstyle merge &&
>   
> diff --git a/t/t7201-co.sh b/t/t7201-co.sh
> index 7f6e23a4bb..11444d5360 100755
> --- a/t/t7201-co.sh
> +++ b/t/t7201-co.sh
> @@ -25,6 +25,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>   
>   . ./test-lib.sh
>   
> +git config merge.conflictstyle merge # TODO: use the default
> +
>   test_tick
>   
>   fill () {
> diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
> index 3fcb44767f..90449e80c3 100755
> --- a/t/t7506-status-submodule.sh
> +++ b/t/t7506-status-submodule.sh
> @@ -253,6 +253,7 @@ test_expect_success 'status with merge conflict in .gitmodules' '
>   	test_create_repo_with_commit sub2 &&
>   	(
>   		cd super &&
> +		git config merge.conflictstyle merge && # TODO: use the default
>   		prev=$(git rev-parse HEAD) &&
>   		git checkout -b add_sub1 &&
>   		git submodule add ../sub1 &&
> diff --git a/xdiff-interface.c b/xdiff-interface.c
> index 19a030fbe2..1447771724 100644
> --- a/xdiff-interface.c
> +++ b/xdiff-interface.c
> @@ -299,7 +299,7 @@ int xdiff_compare_lines(const char *l1, long s1,
>   	return xdl_recmatch(l1, s1, l2, s2, flags);
>   }
>   
> -int git_xmerge_style = XDL_MERGE_STYLE_MERGE;
> +int git_xmerge_style = XDL_MERGE_STYLE_DIFF3;
>   
>   int git_xmerge_config(const char *var, const char *value, void *cb)
>   {
> 

  parent reply	other threads:[~2021-06-10  9:41 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 19:28 [PATCH 0/7] Make diff3 the default conflict style Felipe Contreras
2021-06-09 19:28 ` [PATCH 1/7] test: add merge style config test Felipe Contreras
2021-06-09 19:42   ` Eric Sunshine
2021-06-09 20:29     ` Felipe Contreras
2021-06-10  9:18   ` Phillip Wood
2021-06-10 13:26     ` Felipe Contreras
2021-06-10 14:54       ` Phillip Wood
2021-06-10 16:34         ` Felipe Contreras
2021-06-10 14:58       ` Phillip Wood
2021-06-10 16:47         ` Felipe Contreras
2021-06-11  9:19           ` Phillip Wood
2021-06-11 14:39             ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 2/7] merge-tree: fix merge.conflictstyle handling Felipe Contreras
2021-06-09 19:28 ` [PATCH 3/7] notes: " Felipe Contreras
2021-06-09 19:28 ` [PATCH 4/7] checkout: " Felipe Contreras
2021-06-10  9:32   ` Phillip Wood
2021-06-10 14:11     ` Felipe Contreras
2021-06-10 14:50       ` Phillip Wood
2021-06-10 16:32         ` Felipe Contreras
2021-06-11  9:18           ` Phillip Wood
2021-06-11 14:34             ` Felipe Contreras
2021-06-11  9:18   ` Phillip Wood
2021-06-09 19:28 ` [PATCH 5/7] xdiff: rename XDL_MERGE_STYLE_DIFF3 Felipe Contreras
2021-06-10  9:21   ` Phillip Wood
2021-06-10 13:33     ` Felipe Contreras
2021-06-11  3:17     ` Junio C Hamano
2021-06-11 13:42       ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 6/7] xdiff: simplify style assignments Felipe Contreras
2021-06-10  9:26   ` Phillip Wood
2021-06-10 13:50     ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 7/7] xdiff: make diff3 the default conflictStyle Felipe Contreras
2021-06-10  6:41   ` Johannes Sixt
2021-06-10  7:53     ` Đoàn Trần Công Danh
2021-06-10 13:18       ` Felipe Contreras
2021-06-10 13:18     ` Felipe Contreras
2021-06-10 13:49     ` Jeff King
2021-06-10 16:00       ` Felipe Contreras
2021-06-10 16:31         ` Jeff King
2021-06-11  1:20       ` Junio C Hamano
2021-06-11  6:23         ` Johannes Sixt
2021-06-11  6:43           ` Junio C Hamano
2021-06-11  7:02             ` Johannes Sixt
2021-06-11  7:14               ` Junio C Hamano
2021-06-11 11:51                 ` Sergey Organov
2021-06-11 15:32                   ` Felipe Contreras
2021-06-11 15:52                     ` Sergey Organov
2021-06-11 16:36                       ` Felipe Contreras
     [not found]                     ` <CABPp-BHRQSF2_aYTBfpfnW4Bh3Hz7vLFj_QNGj8R4WeCS6_utw@mail.gmail.com>
2021-06-11 17:57                       ` Felipe Contreras
2021-06-11 19:02                         ` Elijah Newren
2021-06-11 21:05                           ` Felipe Contreras
2021-06-11 21:40                             ` Elijah Newren
2021-06-13 14:34                               ` Felipe Contreras
2021-06-11 16:41                   ` Johannes Sixt
2021-06-11 17:21                     ` Felipe Contreras
2021-06-11 17:40                       ` Sergey Organov
2021-06-11 18:10                         ` Felipe Contreras
2021-06-11 18:22                           ` Sergey Organov
2021-06-11 14:28                 ` Felipe Contreras
2021-06-11 14:25               ` Felipe Contreras
2021-06-11 16:53                 ` Johannes Sixt
     [not found]                 ` <CABPp-BH0aRiSUw03nSK6jHRNQ+zcpUzr6WjeJ5GpdUCqCKxbag@mail.gmail.com>
2021-06-11 17:32                   ` Felipe Contreras
2021-06-11 17:57                     ` Elijah Newren
2021-06-11 18:28                       ` Felipe Contreras
2021-06-11 14:20           ` Felipe Contreras
2021-06-11 14:09         ` Felipe Contreras
2021-06-10  9:40   ` Phillip Wood [this message]
2021-06-10 14:19     ` Felipe Contreras
2021-06-17 17:40 ` [PATCH 0/7] Make diff3 the default conflict style Phillip Wood
2021-06-17 18:24   ` Felipe Contreras

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=bddfe587-704c-a7b2-1182-246226aa09ba@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=davvid@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sorganov@gmail.com \
    --subject='Re: [PATCH 7/7] xdiff: make diff3 the default conflictStyle' \
    /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).