Add testcase for format-patch --subject-prefix (take 3)
Add testcase for format-patch --subject-prefix support. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Robin H. Johnson committed
Apr 11, 2007 at 16:58 UTC
171ddd91771f042e49db49ff068694b5ed6f845d
2 files changed
+165
t/t4013-diff-various.sh
+1
@@ -241,6 +241,7 @@ format-patch --attach --stdout initial..master
241
format-patch --inline --stdout initial..side
242
format-patch --inline --stdout initial..master^
243
format-patch --inline --stdout initial..master
244
+format-patch --inline --stdout --subject-prefix=TESTCASE initial..master
245
246
diff --abbrev initial..side
247
diff -r initial..side
t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
new
+164
@@ -0,0 +1,164 @@
1
+$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master
2
+From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001
3
+From: A U Thor <author@example.com>
4
+Date: Mon, 26 Jun 2006 00:01:00 +0000
5
+Subject: [TESTCASE] Second
6
+MIME-Version: 1.0
7
+Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n"
8
+
9
+This is a multi-part message in MIME format.
10
+--------------g-i-t--v-e-r-s-i-o-n
11
+Content-Type: text/plain; charset=UTF-8; format=fixed
12
+Content-Transfer-Encoding: 8bit
13
+
14
+
15
+This is the second commit.
16
+---
17
+ dir/sub | 2 ++
18
+ file0 | 3 +++
19
+ file2 | 3 ---
20
+ 3 files changed, 5 insertions(+), 3 deletions(-)
21
+ delete mode 100644 file2
22
+--------------g-i-t--v-e-r-s-i-o-n
23
+Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
24
+Content-Transfer-Encoding: 8bit
25
+Content-Disposition: inline; filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
26
+
27
+diff --git a/dir/sub b/dir/sub
28
+index 35d242b..8422d40 100644
29
+--- a/dir/sub
30
++++ b/dir/sub
31
+@@ -1,2 +1,4 @@
32
+ A
33
+ B
34
++C
35
++D
36
+diff --git a/file0 b/file0
37
+index 01e79c3..b414108 100644
38
+--- a/file0
39
++++ b/file0
40
+@@ -1,3 +1,6 @@
41
+ 1
42
+ 2
43
+ 3
44
++4
45
++5
46
++6
47
+diff --git a/file2 b/file2
48
+deleted file mode 100644
49
+index 01e79c3..0000000
50
+--- a/file2
51
++++ /dev/null
52
+@@ -1,3 +0,0 @@
53
+-1
54
+-2
55
+-3
56
+
57
+--------------g-i-t--v-e-r-s-i-o-n--
58
+
59
+
60
+
61
+From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001
62
+From: A U Thor <author@example.com>
63
+Date: Mon, 26 Jun 2006 00:02:00 +0000
64
+Subject: [TESTCASE] Third
65
+MIME-Version: 1.0
66
+Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n"
67
+
68
+This is a multi-part message in MIME format.
69
+--------------g-i-t--v-e-r-s-i-o-n
70
+Content-Type: text/plain; charset=UTF-8; format=fixed
71
+Content-Transfer-Encoding: 8bit
72
+
73
+---
74
+ dir/sub | 2 ++
75
+ file1 | 3 +++
76
+ 2 files changed, 5 insertions(+), 0 deletions(-)
77
+ create mode 100644 file1
78
+--------------g-i-t--v-e-r-s-i-o-n
79
+Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
80
+Content-Transfer-Encoding: 8bit
81
+Content-Disposition: inline; filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
82
+
83
+diff --git a/dir/sub b/dir/sub
84
+index 8422d40..cead32e 100644
85
+--- a/dir/sub
86
++++ b/dir/sub
87
+@@ -2,3 +2,5 @@ A
88
+ B
89
+ C
90
+ D
91
++E
92
++F
93
+diff --git a/file1 b/file1
94
+new file mode 100644
95
+index 0000000..b1e6722
96
+--- /dev/null
97
++++ b/file1
98
+@@ -0,0 +1,3 @@
99
++A
100
++B
101
++C
102
+
103
+--------------g-i-t--v-e-r-s-i-o-n--
104
+
105
+
106
+
107
+From c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Mon Sep 17 00:00:00 2001
108
+From: A U Thor <author@example.com>
109
+Date: Mon, 26 Jun 2006 00:03:00 +0000
110
+Subject: [TESTCASE] Side
111
+MIME-Version: 1.0
112
+Content-Type: multipart/mixed; boundary="------------g-i-t--v-e-r-s-i-o-n"
113
+
114
+This is a multi-part message in MIME format.
115
+--------------g-i-t--v-e-r-s-i-o-n
116
+Content-Type: text/plain; charset=UTF-8; format=fixed
117
+Content-Transfer-Encoding: 8bit
118
+
119
+---
120
+ dir/sub | 2 ++
121
+ file0 | 3 +++
122
+ file3 | 4 ++++
123
+ 3 files changed, 9 insertions(+), 0 deletions(-)
124
+ create mode 100644 file3
125
+--------------g-i-t--v-e-r-s-i-o-n
126
+Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
127
+Content-Transfer-Encoding: 8bit
128
+Content-Disposition: inline; filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
129
+
130
+diff --git a/dir/sub b/dir/sub
131
+index 35d242b..7289e35 100644
132
+--- a/dir/sub
133
++++ b/dir/sub
134
+@@ -1,2 +1,4 @@
135
+ A
136
+ B
137
++1
138
++2
139
+diff --git a/file0 b/file0
140
+index 01e79c3..f4615da 100644
141
+--- a/file0
142
++++ b/file0
143
+@@ -1,3 +1,6 @@
144
+ 1
145
+ 2
146
+ 3
147
++A
148
++B
149
++C
150
+diff --git a/file3 b/file3
151
+new file mode 100644
152
+index 0000000..7289e35
153
+--- /dev/null
154
++++ b/file3
155
+@@ -0,0 +1,4 @@
156
++A
157
++B
158
++1
159
++2
160
+
161
+--------------g-i-t--v-e-r-s-i-o-n--
162
+
163
+
164
+$