git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
44f79ac91b1bc4a7aaac014a78e2f77435c6a274 blob 1985 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
 
#!/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_done
debug log:

solving 44f79ac91b ...
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/3] 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/3] 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/3] 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

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