git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
485ad0eee006d2d15c7e5d22083277ebe4ef2e40 blob 2637 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 
#!/bin/sh

test_description='merge style conflict markers configurations'

. ./test-lib.sh

fill () {
	for i
	do
		echo "$i"
	done
}

test_expect_success 'merge' '
	test_create_repo merge &&
	(
		cd merge &&

		fill 1 2 3 >content &&
		git add content &&
		git commit -m base &&

		git checkout -b r &&
		echo six >>content &&
		git commit -a -m right &&

		git checkout master &&
		echo 7 >>content &&
		git commit -a -m left &&

		test_must_fail git merge r &&
		! grep -E "\|+" content &&

		git reset --hard &&
		test_must_fail git -c merge.conflictstyle=diff3 merge r &&
		grep -E "\|+" content &&

		git reset --hard &&
		test_must_fail git -c merge.conflictstyle=merge merge r &&
		! grep -E "\|+" content
	)
'

test_expect_success 'merge-tree' '
	test_create_repo merge-tree &&
	(
		cd merge-tree &&

		test_commit initial initial-file initial &&
		test_commit r content r &&
		git reset --hard initial &&
		test_commit l content l &&

		git merge-tree initial r l >actual &&
		! grep -E "\|+" actual &&

		git -c merge.conflictstyle=diff3 merge-tree initial r l >actual &&
		grep -E "\|+" actual &&

		git -c merge.conflictstyle=merge merge-tree initial r l >actual &&
		! grep -E "\|+" actual
	)
'

test_expect_success 'notes' '
	test_create_repo notes &&
	(
		test_commit initial &&

		git -c core.notesRef=refs/notes/b notes add -m b initial &&

		git update-ref refs/notes/r refs/notes/b &&
		git -c core.notesRef=refs/notes/r notes add -f -m r initial &&

		git update-ref refs/notes/l refs/notes/b &&
		git config core.notesRef refs/notes/l &&
		git notes add -f -m l initial &&

		test_must_fail git notes merge r &&
		! grep -E "\|+" .git/NOTES_MERGE_WORKTREE/* &&

		git notes merge --abort &&
		test_must_fail git -c merge.conflictstyle=diff3 notes merge r &&
		grep -E "\|+" .git/NOTES_MERGE_WORKTREE/* &&

		git notes merge --abort &&
		test_must_fail git -c merge.conflictstyle=merge notes merge r &&
		! grep -E "\|+" .git/NOTES_MERGE_WORKTREE/*
	)
'

test_expect_success 'checkout' '
	test_create_repo checkout &&
	(
		test_commit checkout &&

		fill a b c d e >content &&
		git add content &&
		git commit -m initial &&

		git checkout -b simple master &&
		fill a c e >content &&
		git commit -a -m simple &&

		fill b d >content &&
		git checkout --merge master &&
		! grep -E "\|+" content &&

		git config merge.conflictstyle merge &&

		git checkout -f simple &&
		fill b d >content &&
		git checkout --merge --conflict=diff3 master &&
		grep -E "\|+" content &&

		git checkout -f simple &&
		fill b d >content &&
		git checkout --merge --conflict=merge master &&
		! grep -E "\|+" content
	)
'

test_done
debug log:

solving 485ad0eee0 ...
found 485ad0eee0 in https://public-inbox.org/git/20210609192842.696646-5-felipe.contreras@gmail.com/
found 44f79ac91b in https://public-inbox.org/git/20210609192842.696646-4-felipe.contreras@gmail.com/
found 978f4e3e70 in https://public-inbox.org/git/20210609192842.696646-3-felipe.contreras@gmail.com/
found 6952552c58 in https://public-inbox.org/git/20210609192842.696646-2-felipe.contreras@gmail.com/

applying [1/4] https://public-inbox.org/git/20210609192842.696646-2-felipe.contreras@gmail.com/
diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh
new file mode 100755
index 0000000000..6952552c58


applying [2/4] https://public-inbox.org/git/20210609192842.696646-3-felipe.contreras@gmail.com/
diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh
index 6952552c58..978f4e3e70 100755


applying [3/4] https://public-inbox.org/git/20210609192842.696646-4-felipe.contreras@gmail.com/
diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh
index 978f4e3e70..44f79ac91b 100755


applying [4/4] https://public-inbox.org/git/20210609192842.696646-5-felipe.contreras@gmail.com/
diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh
index 44f79ac91b..485ad0eee0 100755

Checking patch t/t6440-config-conflict-markers.sh...
Applied patch t/t6440-config-conflict-markers.sh cleanly.
Checking patch t/t6440-config-conflict-markers.sh...
Applied patch t/t6440-config-conflict-markers.sh cleanly.
Checking patch t/t6440-config-conflict-markers.sh...
Applied patch t/t6440-config-conflict-markers.sh cleanly.
Checking patch t/t6440-config-conflict-markers.sh...
Applied patch t/t6440-config-conflict-markers.sh cleanly.

index at:
100755 485ad0eee006d2d15c7e5d22083277ebe4ef2e40	t/t6440-config-conflict-markers.sh

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).