git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
2029115ecd6c631d4cfc80e8a59bc5d957c5f49f blob 841 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
 
#!/bin/sh

test_description='test am --quoted-cr=<action>'

. ./test-lib.sh

DATA="$TEST_DIRECTORY/t4258"

test_expect_success 'setup' '
	test_write_lines one two three >text &&
	test_commit one text &&
	test_write_lines one owt three >text &&
	test_commit two text
'

test_expect_success 'am warn if quoted-cr is found' '
	git reset --hard one &&
	test_must_fail git am "$DATA/mbox" 2>err &&
	grep "quoted CR detected" err
'

test_expect_success 'am strip if quoted-cr is found' '
	test_might_fail git am --abort &&
	git reset --hard one &&
	git am --quoted-cr=strip "$DATA/mbox" &&
	git diff --exit-code HEAD two
'

test_expect_success 'am strip if quoted-cr is found' '
	test_might_fail git am --abort &&
	git reset --hard one &&
	test_config mailinfo.quotedCr strip &&
	git am "$DATA/mbox" &&
	git diff --exit-code HEAD two
'

test_done
debug log:

solving 2029115ecd ...
found 2029115ecd in https://public-inbox.org/git/d2052bcea925ec9e7d780e99e5b5e3bb1b9bd056.1620148732.git.congdanhqx@gmail.com/ ||
	https://public-inbox.org/git/d6aa12acc0c0e11e2268ff344fa63cf5edf51290.1620311544.git.congdanhqx@gmail.com/

applying [1/2] https://public-inbox.org/git/d2052bcea925ec9e7d780e99e5b5e3bb1b9bd056.1620148732.git.congdanhqx@gmail.com/
diff --git a/t/t4258-am-quoted-cr.sh b/t/t4258-am-quoted-cr.sh
new file mode 100755
index 0000000000..2029115ecd

Checking patch t/t4258-am-quoted-cr.sh...
Applied patch t/t4258-am-quoted-cr.sh cleanly.

skipping https://public-inbox.org/git/d6aa12acc0c0e11e2268ff344fa63cf5edf51290.1620311544.git.congdanhqx@gmail.com/ for 2029115ecd
index at:
100755 2029115ecd6c631d4cfc80e8a59bc5d957c5f49f	t/t4258-am-quoted-cr.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).