git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
f38ae6f5fcc4adb5f09586d604a91f77b934f477 blob 1329 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
 
#!/bin/sh
#
# Copyright (c) 2019 Rohit Ashiwal
#

test_description='tests to ensure compatibility between am and interactive backends'

. ./test-lib.sh

# This is a special case in which both am and interactive backends
# provide the same outputs. It was done intentionally because
# --ignore-whitespace both the backends fall short of optimal
# behaviour.
test_expect_success 'setup' '
	git checkout -b topic &&
	q_to_tab >file <<-EOF &&
	line 1
	Qline 2
	line 3
	EOF
	git add file &&
	git commit -m "add file" &&
	q_to_tab >file <<-EOF &&
	line 1
	new line 2
	line 3
	EOF
	git commit -am "update file" &&
	git tag side &&

	git checkout --orphan master &&
	q_to_tab >file <<-EOF &&
	line 1
	        line 2
	line 3
	EOF
	git add file &&
	git commit -m "add file" &&
	git tag main
'

test_expect_success '--ignore-whitespace works with am backend' '
	cat >expect <<-EOF &&
	line 1
	new line 2
	line 3
	EOF
	test_must_fail git rebase main side &&
	git rebase --abort &&
	git rebase --ignore-whitespace main side &&
	test_cmp expect file
'

test_expect_success '--ignore-whitespace works with interactive backend' '
	cat >expect <<-EOF &&
	line 1
	new line 2
	line 3
	EOF
	test_must_fail git rebase --merge main side &&
	git rebase --abort &&
	git rebase --merge --ignore-whitespace main side &&
	test_cmp expect file
'

test_done
debug log:

solving f38ae6f5fc ...
found f38ae6f5fc in https://public-inbox.org/git/20190718185514.20108-2-rohit.ashiwal265@gmail.com/

applying [1/1] https://public-inbox.org/git/20190718185514.20108-2-rohit.ashiwal265@gmail.com/
diff --git a/t/t3431-rebase-options-compatibility.sh b/t/t3431-rebase-options-compatibility.sh
new file mode 100755
index 0000000000..f38ae6f5fc

Checking patch t/t3431-rebase-options-compatibility.sh...
Applied patch t/t3431-rebase-options-compatibility.sh cleanly.

index at:
100755 f38ae6f5fcc4adb5f09586d604a91f77b934f477	t/t3431-rebase-options-compatibility.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).