@matheusbsbs / matheus-bagliano / commits / 47979d5d5b
Fork 0

t4013: add more tests around -c and --cc

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jun 26, 2006 at 23:29 UTC 47979d5d5bb86d058dce77801648734abe1e593b
18 files changed +1263 -3
t/t4013-diff-various.sh
+25 -3
@@ -163,6 +163,22 @@ diff-tree -p -m master
163 diff-tree -c master
164 diff-tree -c --abbrev master
165 diff-tree --cc master
166 +# stat only should show the diffstat with the first parent
167 +diff-tree -c --stat master
168 +diff-tree --cc --stat master
169 +diff-tree -c --stat --summary master
170 +diff-tree --cc --stat --summary master
171 +# stat summary should show the diffstat and summary with the first parent
172 +diff-tree -c --stat --summary side
173 +diff-tree --cc --stat --summary side
174 +# this one gives an extra newline after stat, which should be removed
175 +# diff-tree --cc --patch-with-stat master
176 +# this one gives an extra newline after stat, which should be removed
177 +# other than that it shows the correct example -- stat and summary are
178 +# against the first parent, and patch-looking combined diff follows.
179 +diff-tree --cc --patch-with-stat --summary master
180 +# this is correct
181 +diff-tree --cc --patch-with-stat --summary side
182
183 log master
184 log -p master
@@ -170,8 +186,11 @@ log --root master
186 log --root -p master
187 log --patch-with-stat master
188 log --root --patch-with-stat master
173 -#log --root --patch-with-stat --summary master
189 +log --root --patch-with-stat --summary master
190 +log --root -c --patch-with-stat --summary master
191 +log --root --cc --patch-with-stat --summary master
192 log -SF master
193 +log -SF -p master
194
195 whatchanged master
196 whatchanged -p master
@@ -180,10 +199,15 @@ whatchanged --root -p master
199 whatchanged --patch-with-stat master
200 whatchanged --root --patch-with-stat master
201 whatchanged --root --patch-with-stat --summary master
202 +whatchanged --root -c --patch-with-stat --summary master
203 +whatchanged --root --cc --patch-with-stat --summary master
204 whatchanged -SF master
205 +whatchanged -SF -p master
206
207 log --patch-with-stat master -- dir/
208 whatchanged --patch-with-stat master -- dir/
209 +log --patch-with-stat --summary master -- dir/
210 +whatchanged --patch-with-stat --summary master -- dir/
211
212 show initial
213 show --root initial
@@ -195,8 +219,6 @@ show --patch-with-stat side
219 show --patch-with-raw side
220 show --patch-with-stat --summary side
221
198 -
199 -
222 EOF
223
224 test_done
t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master new
+35
@@ -0,0 +1,35 @@
1 +$ git diff-tree --cc --patch-with-stat --summary master
2 +176b998f5d647cbd77a9d8acf4531e930754d16d
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + 2 files changed, 5 insertions(+), 0 deletions(-)
6 +
7 +
8 +diff --cc dir/sub
9 +index cead32e,7289e35..992913c
10 +--- a/dir/sub
11 ++++ b/dir/sub
12 +@@@ -1,6 -1,4 +1,8 @@@
13 + A
14 + B
15 + +C
16 + +D
17 + +E
18 + +F
19 ++ 1
20 ++ 2
21 +diff --cc file0
22 +index b414108,f4615da..10a8a9f
23 +--- a/file0
24 ++++ b/file0
25 +@@@ -1,6 -1,6 +1,9 @@@
26 + 1
27 + 2
28 + 3
29 + +4
30 + +5
31 + +6
32 ++ A
33 ++ B
34 ++ C
35 +$
t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side new
+39
@@ -0,0 +1,39 @@
1 +$ git diff-tree --cc --patch-with-stat --summary side
2 +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + file3 | 4 ++++
6 + 3 files changed, 9 insertions(+), 0 deletions(-)
7 + create mode 100644 file3
8 +
9 +diff --git a/dir/sub b/dir/sub
10 +index 35d242b..7289e35 100644
11 +--- a/dir/sub
12 ++++ b/dir/sub
13 +@@ -1,2 +1,4 @@
14 + A
15 + B
16 ++1
17 ++2
18 +diff --git a/file0 b/file0
19 +index 01e79c3..f4615da 100644
20 +--- a/file0
21 ++++ b/file0
22 +@@ -1,3 +1,6 @@
23 + 1
24 + 2
25 + 3
26 ++A
27 ++B
28 ++C
29 +diff --git a/file3 b/file3
30 +new file mode 100644
31 +index 0000000..7289e35
32 +--- /dev/null
33 ++++ b/file3
34 +@@ -0,0 +1,4 @@
35 ++A
36 ++B
37 ++1
38 ++2
39 +$
t/t4013/diff.diff-tree_--cc_--stat_--summary_master new
+6
@@ -0,0 +1,6 @@
1 +$ git diff-tree --cc --stat --summary master
2 +176b998f5d647cbd77a9d8acf4531e930754d16d
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + 2 files changed, 5 insertions(+), 0 deletions(-)
6 +$
t/t4013/diff.diff-tree_--cc_--stat_--summary_side new
+8
@@ -0,0 +1,8 @@
1 +$ git diff-tree --cc --stat --summary side
2 +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + file3 | 4 ++++
6 + 3 files changed, 9 insertions(+), 0 deletions(-)
7 + create mode 100644 file3
8 +$
t/t4013/diff.diff-tree_--cc_--stat_master new
+6
@@ -0,0 +1,6 @@
1 +$ git diff-tree --cc --stat master
2 +176b998f5d647cbd77a9d8acf4531e930754d16d
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + 2 files changed, 5 insertions(+), 0 deletions(-)
6 +$
t/t4013/diff.diff-tree_-c_--stat_--summary_master new
+6
@@ -0,0 +1,6 @@
1 +$ git diff-tree -c --stat --summary master
2 +176b998f5d647cbd77a9d8acf4531e930754d16d
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + 2 files changed, 5 insertions(+), 0 deletions(-)
6 +$
t/t4013/diff.diff-tree_-c_--stat_--summary_side new
+8
@@ -0,0 +1,8 @@
1 +$ git diff-tree -c --stat --summary side
2 +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + file3 | 4 ++++
6 + 3 files changed, 9 insertions(+), 0 deletions(-)
7 + create mode 100644 file3
8 +$
t/t4013/diff.diff-tree_-c_--stat_master new
+6
@@ -0,0 +1,6 @@
1 +$ git diff-tree -c --stat master
2 +176b998f5d647cbd77a9d8acf4531e930754d16d
3 + dir/sub | 2 ++
4 + file0 | 3 +++
5 + 2 files changed, 5 insertions(+), 0 deletions(-)
6 +$
t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ new
+72
@@ -0,0 +1,72 @@
1 +$ git log --patch-with-stat --summary master -- dir/
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +
9 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10 +Author: A U Thor <author@example.com>
11 +Date: Mon Jun 26 00:03:00 2006 +0000
12 +
13 + Side
14 +---
15 + dir/sub | 2 ++
16 + 1 files changed, 2 insertions(+), 0 deletions(-)
17 +
18 +diff --git a/dir/sub b/dir/sub
19 +index 35d242b..7289e35 100644
20 +--- a/dir/sub
21 ++++ b/dir/sub
22 +@@ -1,2 +1,4 @@
23 + A
24 + B
25 ++1
26 ++2
27 +
28 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
29 +Author: A U Thor <author@example.com>
30 +Date: Mon Jun 26 00:02:00 2006 +0000
31 +
32 + Third
33 +---
34 + dir/sub | 2 ++
35 + 1 files changed, 2 insertions(+), 0 deletions(-)
36 +
37 +diff --git a/dir/sub b/dir/sub
38 +index 8422d40..cead32e 100644
39 +--- a/dir/sub
40 ++++ b/dir/sub
41 +@@ -2,3 +2,5 @@ A
42 + B
43 + C
44 + D
45 ++E
46 ++F
47 +
48 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
49 +Author: A U Thor <author@example.com>
50 +Date: Mon Jun 26 00:01:00 2006 +0000
51 +
52 + Second
53 +---
54 + dir/sub | 2 ++
55 + 1 files changed, 2 insertions(+), 0 deletions(-)
56 +
57 +diff --git a/dir/sub b/dir/sub
58 +index 35d242b..8422d40 100644
59 +--- a/dir/sub
60 ++++ b/dir/sub
61 +@@ -1,2 +1,4 @@
62 + A
63 + B
64 ++C
65 ++D
66 +
67 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
68 +Author: A U Thor <author@example.com>
69 +Date: Mon Jun 26 00:00:00 2006 +0000
70 +
71 + Initial
72 +$
t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master new
+198
@@ -0,0 +1,198 @@
1 +$ git log --root --cc --patch-with-stat --summary master
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +---
9 + dir/sub | 2 ++
10 + file0 | 3 +++
11 + 2 files changed, 5 insertions(+), 0 deletions(-)
12 +
13 +
14 +diff --cc dir/sub
15 +index cead32e,7289e35..992913c
16 +--- a/dir/sub
17 ++++ b/dir/sub
18 +@@@ -1,6 -1,4 +1,8 @@@
19 + A
20 + B
21 + +C
22 + +D
23 + +E
24 + +F
25 ++ 1
26 ++ 2
27 +diff --cc file0
28 +index b414108,f4615da..10a8a9f
29 +--- a/file0
30 ++++ b/file0
31 +@@@ -1,6 -1,6 +1,9 @@@
32 + 1
33 + 2
34 + 3
35 + +4
36 + +5
37 + +6
38 ++ A
39 ++ B
40 ++ C
41 +
42 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
43 +Author: A U Thor <author@example.com>
44 +Date: Mon Jun 26 00:03:00 2006 +0000
45 +
46 + Side
47 +---
48 + dir/sub | 2 ++
49 + file0 | 3 +++
50 + file3 | 4 ++++
51 + 3 files changed, 9 insertions(+), 0 deletions(-)
52 + create mode 100644 file3
53 +
54 +diff --git a/dir/sub b/dir/sub
55 +index 35d242b..7289e35 100644
56 +--- a/dir/sub
57 ++++ b/dir/sub
58 +@@ -1,2 +1,4 @@
59 + A
60 + B
61 ++1
62 ++2
63 +diff --git a/file0 b/file0
64 +index 01e79c3..f4615da 100644
65 +--- a/file0
66 ++++ b/file0
67 +@@ -1,3 +1,6 @@
68 + 1
69 + 2
70 + 3
71 ++A
72 ++B
73 ++C
74 +diff --git a/file3 b/file3
75 +new file mode 100644
76 +index 0000000..7289e35
77 +--- /dev/null
78 ++++ b/file3
79 +@@ -0,0 +1,4 @@
80 ++A
81 ++B
82 ++1
83 ++2
84 +
85 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
86 +Author: A U Thor <author@example.com>
87 +Date: Mon Jun 26 00:02:00 2006 +0000
88 +
89 + Third
90 +---
91 + dir/sub | 2 ++
92 + file1 | 3 +++
93 + 2 files changed, 5 insertions(+), 0 deletions(-)
94 + create mode 100644 file1
95 +
96 +diff --git a/dir/sub b/dir/sub
97 +index 8422d40..cead32e 100644
98 +--- a/dir/sub
99 ++++ b/dir/sub
100 +@@ -2,3 +2,5 @@ A
101 + B
102 + C
103 + D
104 ++E
105 ++F
106 +diff --git a/file1 b/file1
107 +new file mode 100644
108 +index 0000000..b1e6722
109 +--- /dev/null
110 ++++ b/file1
111 +@@ -0,0 +1,3 @@
112 ++A
113 ++B
114 ++C
115 +
116 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
117 +Author: A U Thor <author@example.com>
118 +Date: Mon Jun 26 00:01:00 2006 +0000
119 +
120 + Second
121 +---
122 + dir/sub | 2 ++
123 + file0 | 3 +++
124 + file2 | 3 ---
125 + 3 files changed, 5 insertions(+), 3 deletions(-)
126 + delete mode 100644 file2
127 +
128 +diff --git a/dir/sub b/dir/sub
129 +index 35d242b..8422d40 100644
130 +--- a/dir/sub
131 ++++ b/dir/sub
132 +@@ -1,2 +1,4 @@
133 + A
134 + B
135 ++C
136 ++D
137 +diff --git a/file0 b/file0
138 +index 01e79c3..b414108 100644
139 +--- a/file0
140 ++++ b/file0
141 +@@ -1,3 +1,6 @@
142 + 1
143 + 2
144 + 3
145 ++4
146 ++5
147 ++6
148 +diff --git a/file2 b/file2
149 +deleted file mode 100644
150 +index 01e79c3..0000000
151 +--- a/file2
152 ++++ /dev/null
153 +@@ -1,3 +0,0 @@
154 +-1
155 +-2
156 +-3
157 +
158 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
159 +Author: A U Thor <author@example.com>
160 +Date: Mon Jun 26 00:00:00 2006 +0000
161 +
162 + Initial
163 +---
164 + dir/sub | 2 ++
165 + file0 | 3 +++
166 + file2 | 3 +++
167 + 3 files changed, 8 insertions(+), 0 deletions(-)
168 + create mode 100644 dir/sub
169 + create mode 100644 file0
170 + create mode 100644 file2
171 +
172 +diff --git a/dir/sub b/dir/sub
173 +new file mode 100644
174 +index 0000000..35d242b
175 +--- /dev/null
176 ++++ b/dir/sub
177 +@@ -0,0 +1,2 @@
178 ++A
179 ++B
180 +diff --git a/file0 b/file0
181 +new file mode 100644
182 +index 0000000..01e79c3
183 +--- /dev/null
184 ++++ b/file0
185 +@@ -0,0 +1,3 @@
186 ++1
187 ++2
188 ++3
189 +diff --git a/file2 b/file2
190 +new file mode 100644
191 +index 0000000..01e79c3
192 +--- /dev/null
193 ++++ b/file2
194 +@@ -0,0 +1,3 @@
195 ++1
196 ++2
197 ++3
198 +$
t/t4013/diff.log_--root_--patch-with-stat_--summary_master new
+165
@@ -0,0 +1,165 @@
1 +$ git log --root --patch-with-stat --summary master
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +
9 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10 +Author: A U Thor <author@example.com>
11 +Date: Mon Jun 26 00:03:00 2006 +0000
12 +
13 + Side
14 +---
15 + dir/sub | 2 ++
16 + file0 | 3 +++
17 + file3 | 4 ++++
18 + 3 files changed, 9 insertions(+), 0 deletions(-)
19 + create mode 100644 file3
20 +
21 +diff --git a/dir/sub b/dir/sub
22 +index 35d242b..7289e35 100644
23 +--- a/dir/sub
24 ++++ b/dir/sub
25 +@@ -1,2 +1,4 @@
26 + A
27 + B
28 ++1
29 ++2
30 +diff --git a/file0 b/file0
31 +index 01e79c3..f4615da 100644
32 +--- a/file0
33 ++++ b/file0
34 +@@ -1,3 +1,6 @@
35 + 1
36 + 2
37 + 3
38 ++A
39 ++B
40 ++C
41 +diff --git a/file3 b/file3
42 +new file mode 100644
43 +index 0000000..7289e35
44 +--- /dev/null
45 ++++ b/file3
46 +@@ -0,0 +1,4 @@
47 ++A
48 ++B
49 ++1
50 ++2
51 +
52 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
53 +Author: A U Thor <author@example.com>
54 +Date: Mon Jun 26 00:02:00 2006 +0000
55 +
56 + Third
57 +---
58 + dir/sub | 2 ++
59 + file1 | 3 +++
60 + 2 files changed, 5 insertions(+), 0 deletions(-)
61 + create mode 100644 file1
62 +
63 +diff --git a/dir/sub b/dir/sub
64 +index 8422d40..cead32e 100644
65 +--- a/dir/sub
66 ++++ b/dir/sub
67 +@@ -2,3 +2,5 @@ A
68 + B
69 + C
70 + D
71 ++E
72 ++F
73 +diff --git a/file1 b/file1
74 +new file mode 100644
75 +index 0000000..b1e6722
76 +--- /dev/null
77 ++++ b/file1
78 +@@ -0,0 +1,3 @@
79 ++A
80 ++B
81 ++C
82 +
83 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
84 +Author: A U Thor <author@example.com>
85 +Date: Mon Jun 26 00:01:00 2006 +0000
86 +
87 + Second
88 +---
89 + dir/sub | 2 ++
90 + file0 | 3 +++
91 + file2 | 3 ---
92 + 3 files changed, 5 insertions(+), 3 deletions(-)
93 + delete mode 100644 file2
94 +
95 +diff --git a/dir/sub b/dir/sub
96 +index 35d242b..8422d40 100644
97 +--- a/dir/sub
98 ++++ b/dir/sub
99 +@@ -1,2 +1,4 @@
100 + A
101 + B
102 ++C
103 ++D
104 +diff --git a/file0 b/file0
105 +index 01e79c3..b414108 100644
106 +--- a/file0
107 ++++ b/file0
108 +@@ -1,3 +1,6 @@
109 + 1
110 + 2
111 + 3
112 ++4
113 ++5
114 ++6
115 +diff --git a/file2 b/file2
116 +deleted file mode 100644
117 +index 01e79c3..0000000
118 +--- a/file2
119 ++++ /dev/null
120 +@@ -1,3 +0,0 @@
121 +-1
122 +-2
123 +-3
124 +
125 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
126 +Author: A U Thor <author@example.com>
127 +Date: Mon Jun 26 00:00:00 2006 +0000
128 +
129 + Initial
130 +---
131 + dir/sub | 2 ++
132 + file0 | 3 +++
133 + file2 | 3 +++
134 + 3 files changed, 8 insertions(+), 0 deletions(-)
135 + create mode 100644 dir/sub
136 + create mode 100644 file0
137 + create mode 100644 file2
138 +
139 +diff --git a/dir/sub b/dir/sub
140 +new file mode 100644
141 +index 0000000..35d242b
142 +--- /dev/null
143 ++++ b/dir/sub
144 +@@ -0,0 +1,2 @@
145 ++A
146 ++B
147 +diff --git a/file0 b/file0
148 +new file mode 100644
149 +index 0000000..01e79c3
150 +--- /dev/null
151 ++++ b/file0
152 +@@ -0,0 +1,3 @@
153 ++1
154 ++2
155 ++3
156 +diff --git a/file2 b/file2
157 +new file mode 100644
158 +index 0000000..01e79c3
159 +--- /dev/null
160 ++++ b/file2
161 +@@ -0,0 +1,3 @@
162 ++1
163 ++2
164 ++3
165 +$
t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master new
+198
@@ -0,0 +1,198 @@
1 +$ git log --root -c --patch-with-stat --summary master
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +---
9 + dir/sub | 2 ++
10 + file0 | 3 +++
11 + 2 files changed, 5 insertions(+), 0 deletions(-)
12 +
13 +
14 +diff --combined dir/sub
15 +index cead32e,7289e35..992913c
16 +--- a/dir/sub
17 ++++ b/dir/sub
18 +@@@ -1,6 -1,4 +1,8 @@@
19 + A
20 + B
21 + +C
22 + +D
23 + +E
24 + +F
25 ++ 1
26 ++ 2
27 +diff --combined file0
28 +index b414108,f4615da..10a8a9f
29 +--- a/file0
30 ++++ b/file0
31 +@@@ -1,6 -1,6 +1,9 @@@
32 + 1
33 + 2
34 + 3
35 + +4
36 + +5
37 + +6
38 ++ A
39 ++ B
40 ++ C
41 +
42 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
43 +Author: A U Thor <author@example.com>
44 +Date: Mon Jun 26 00:03:00 2006 +0000
45 +
46 + Side
47 +---
48 + dir/sub | 2 ++
49 + file0 | 3 +++
50 + file3 | 4 ++++
51 + 3 files changed, 9 insertions(+), 0 deletions(-)
52 + create mode 100644 file3
53 +
54 +diff --git a/dir/sub b/dir/sub
55 +index 35d242b..7289e35 100644
56 +--- a/dir/sub
57 ++++ b/dir/sub
58 +@@ -1,2 +1,4 @@
59 + A
60 + B
61 ++1
62 ++2
63 +diff --git a/file0 b/file0
64 +index 01e79c3..f4615da 100644
65 +--- a/file0
66 ++++ b/file0
67 +@@ -1,3 +1,6 @@
68 + 1
69 + 2
70 + 3
71 ++A
72 ++B
73 ++C
74 +diff --git a/file3 b/file3
75 +new file mode 100644
76 +index 0000000..7289e35
77 +--- /dev/null
78 ++++ b/file3
79 +@@ -0,0 +1,4 @@
80 ++A
81 ++B
82 ++1
83 ++2
84 +
85 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
86 +Author: A U Thor <author@example.com>
87 +Date: Mon Jun 26 00:02:00 2006 +0000
88 +
89 + Third
90 +---
91 + dir/sub | 2 ++
92 + file1 | 3 +++
93 + 2 files changed, 5 insertions(+), 0 deletions(-)
94 + create mode 100644 file1
95 +
96 +diff --git a/dir/sub b/dir/sub
97 +index 8422d40..cead32e 100644
98 +--- a/dir/sub
99 ++++ b/dir/sub
100 +@@ -2,3 +2,5 @@ A
101 + B
102 + C
103 + D
104 ++E
105 ++F
106 +diff --git a/file1 b/file1
107 +new file mode 100644
108 +index 0000000..b1e6722
109 +--- /dev/null
110 ++++ b/file1
111 +@@ -0,0 +1,3 @@
112 ++A
113 ++B
114 ++C
115 +
116 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
117 +Author: A U Thor <author@example.com>
118 +Date: Mon Jun 26 00:01:00 2006 +0000
119 +
120 + Second
121 +---
122 + dir/sub | 2 ++
123 + file0 | 3 +++
124 + file2 | 3 ---
125 + 3 files changed, 5 insertions(+), 3 deletions(-)
126 + delete mode 100644 file2
127 +
128 +diff --git a/dir/sub b/dir/sub
129 +index 35d242b..8422d40 100644
130 +--- a/dir/sub
131 ++++ b/dir/sub
132 +@@ -1,2 +1,4 @@
133 + A
134 + B
135 ++C
136 ++D
137 +diff --git a/file0 b/file0
138 +index 01e79c3..b414108 100644
139 +--- a/file0
140 ++++ b/file0
141 +@@ -1,3 +1,6 @@
142 + 1
143 + 2
144 + 3
145 ++4
146 ++5
147 ++6
148 +diff --git a/file2 b/file2
149 +deleted file mode 100644
150 +index 01e79c3..0000000
151 +--- a/file2
152 ++++ /dev/null
153 +@@ -1,3 +0,0 @@
154 +-1
155 +-2
156 +-3
157 +
158 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
159 +Author: A U Thor <author@example.com>
160 +Date: Mon Jun 26 00:00:00 2006 +0000
161 +
162 + Initial
163 +---
164 + dir/sub | 2 ++
165 + file0 | 3 +++
166 + file2 | 3 +++
167 + 3 files changed, 8 insertions(+), 0 deletions(-)
168 + create mode 100644 dir/sub
169 + create mode 100644 file0
170 + create mode 100644 file2
171 +
172 +diff --git a/dir/sub b/dir/sub
173 +new file mode 100644
174 +index 0000000..35d242b
175 +--- /dev/null
176 ++++ b/dir/sub
177 +@@ -0,0 +1,2 @@
178 ++A
179 ++B
180 +diff --git a/file0 b/file0
181 +new file mode 100644
182 +index 0000000..01e79c3
183 +--- /dev/null
184 ++++ b/file0
185 +@@ -0,0 +1,3 @@
186 ++1
187 ++2
188 ++3
189 +diff --git a/file2 b/file2
190 +new file mode 100644
191 +index 0000000..01e79c3
192 +--- /dev/null
193 ++++ b/file2
194 +@@ -0,0 +1,3 @@
195 ++1
196 ++2
197 ++3
198 +$
t/t4013/diff.log_-SF_-p_master new
+18
@@ -0,0 +1,18 @@
1 +$ git log -SF -p master
2 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
3 +Author: A U Thor <author@example.com>
4 +Date: Mon Jun 26 00:02:00 2006 +0000
5 +
6 + Third
7 +
8 +diff --git a/dir/sub b/dir/sub
9 +index 8422d40..cead32e 100644
10 +--- a/dir/sub
11 ++++ b/dir/sub
12 +@@ -2,3 +2,5 @@ A
13 + B
14 + C
15 + D
16 ++E
17 ++F
18 +$
t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ new
+59
@@ -0,0 +1,59 @@
1 +$ git whatchanged --patch-with-stat --summary master -- dir/
2 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
3 +Author: A U Thor <author@example.com>
4 +Date: Mon Jun 26 00:03:00 2006 +0000
5 +
6 + Side
7 +---
8 + dir/sub | 2 ++
9 + 1 files changed, 2 insertions(+), 0 deletions(-)
10 +
11 +diff --git a/dir/sub b/dir/sub
12 +index 35d242b..7289e35 100644
13 +--- a/dir/sub
14 ++++ b/dir/sub
15 +@@ -1,2 +1,4 @@
16 + A
17 + B
18 ++1
19 ++2
20 +
21 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
22 +Author: A U Thor <author@example.com>
23 +Date: Mon Jun 26 00:02:00 2006 +0000
24 +
25 + Third
26 +---
27 + dir/sub | 2 ++
28 + 1 files changed, 2 insertions(+), 0 deletions(-)
29 +
30 +diff --git a/dir/sub b/dir/sub
31 +index 8422d40..cead32e 100644
32 +--- a/dir/sub
33 ++++ b/dir/sub
34 +@@ -2,3 +2,5 @@ A
35 + B
36 + C
37 + D
38 ++E
39 ++F
40 +
41 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
42 +Author: A U Thor <author@example.com>
43 +Date: Mon Jun 26 00:01:00 2006 +0000
44 +
45 + Second
46 +---
47 + dir/sub | 2 ++
48 + 1 files changed, 2 insertions(+), 0 deletions(-)
49 +
50 +diff --git a/dir/sub b/dir/sub
51 +index 35d242b..8422d40 100644
52 +--- a/dir/sub
53 ++++ b/dir/sub
54 +@@ -1,2 +1,4 @@
55 + A
56 + B
57 ++C
58 ++D
59 +$
t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master new
+198
@@ -0,0 +1,198 @@
1 +$ git whatchanged --root --cc --patch-with-stat --summary master
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +---
9 + dir/sub | 2 ++
10 + file0 | 3 +++
11 + 2 files changed, 5 insertions(+), 0 deletions(-)
12 +
13 +
14 +diff --cc dir/sub
15 +index cead32e,7289e35..992913c
16 +--- a/dir/sub
17 ++++ b/dir/sub
18 +@@@ -1,6 -1,4 +1,8 @@@
19 + A
20 + B
21 + +C
22 + +D
23 + +E
24 + +F
25 ++ 1
26 ++ 2
27 +diff --cc file0
28 +index b414108,f4615da..10a8a9f
29 +--- a/file0
30 ++++ b/file0
31 +@@@ -1,6 -1,6 +1,9 @@@
32 + 1
33 + 2
34 + 3
35 + +4
36 + +5
37 + +6
38 ++ A
39 ++ B
40 ++ C
41 +
42 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
43 +Author: A U Thor <author@example.com>
44 +Date: Mon Jun 26 00:03:00 2006 +0000
45 +
46 + Side
47 +---
48 + dir/sub | 2 ++
49 + file0 | 3 +++
50 + file3 | 4 ++++
51 + 3 files changed, 9 insertions(+), 0 deletions(-)
52 + create mode 100644 file3
53 +
54 +diff --git a/dir/sub b/dir/sub
55 +index 35d242b..7289e35 100644
56 +--- a/dir/sub
57 ++++ b/dir/sub
58 +@@ -1,2 +1,4 @@
59 + A
60 + B
61 ++1
62 ++2
63 +diff --git a/file0 b/file0
64 +index 01e79c3..f4615da 100644
65 +--- a/file0
66 ++++ b/file0
67 +@@ -1,3 +1,6 @@
68 + 1
69 + 2
70 + 3
71 ++A
72 ++B
73 ++C
74 +diff --git a/file3 b/file3
75 +new file mode 100644
76 +index 0000000..7289e35
77 +--- /dev/null
78 ++++ b/file3
79 +@@ -0,0 +1,4 @@
80 ++A
81 ++B
82 ++1
83 ++2
84 +
85 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
86 +Author: A U Thor <author@example.com>
87 +Date: Mon Jun 26 00:02:00 2006 +0000
88 +
89 + Third
90 +---
91 + dir/sub | 2 ++
92 + file1 | 3 +++
93 + 2 files changed, 5 insertions(+), 0 deletions(-)
94 + create mode 100644 file1
95 +
96 +diff --git a/dir/sub b/dir/sub
97 +index 8422d40..cead32e 100644
98 +--- a/dir/sub
99 ++++ b/dir/sub
100 +@@ -2,3 +2,5 @@ A
101 + B
102 + C
103 + D
104 ++E
105 ++F
106 +diff --git a/file1 b/file1
107 +new file mode 100644
108 +index 0000000..b1e6722
109 +--- /dev/null
110 ++++ b/file1
111 +@@ -0,0 +1,3 @@
112 ++A
113 ++B
114 ++C
115 +
116 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
117 +Author: A U Thor <author@example.com>
118 +Date: Mon Jun 26 00:01:00 2006 +0000
119 +
120 + Second
121 +---
122 + dir/sub | 2 ++
123 + file0 | 3 +++
124 + file2 | 3 ---
125 + 3 files changed, 5 insertions(+), 3 deletions(-)
126 + delete mode 100644 file2
127 +
128 +diff --git a/dir/sub b/dir/sub
129 +index 35d242b..8422d40 100644
130 +--- a/dir/sub
131 ++++ b/dir/sub
132 +@@ -1,2 +1,4 @@
133 + A
134 + B
135 ++C
136 ++D
137 +diff --git a/file0 b/file0
138 +index 01e79c3..b414108 100644
139 +--- a/file0
140 ++++ b/file0
141 +@@ -1,3 +1,6 @@
142 + 1
143 + 2
144 + 3
145 ++4
146 ++5
147 ++6
148 +diff --git a/file2 b/file2
149 +deleted file mode 100644
150 +index 01e79c3..0000000
151 +--- a/file2
152 ++++ /dev/null
153 +@@ -1,3 +0,0 @@
154 +-1
155 +-2
156 +-3
157 +
158 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
159 +Author: A U Thor <author@example.com>
160 +Date: Mon Jun 26 00:00:00 2006 +0000
161 +
162 + Initial
163 +---
164 + dir/sub | 2 ++
165 + file0 | 3 +++
166 + file2 | 3 +++
167 + 3 files changed, 8 insertions(+), 0 deletions(-)
168 + create mode 100644 dir/sub
169 + create mode 100644 file0
170 + create mode 100644 file2
171 +
172 +diff --git a/dir/sub b/dir/sub
173 +new file mode 100644
174 +index 0000000..35d242b
175 +--- /dev/null
176 ++++ b/dir/sub
177 +@@ -0,0 +1,2 @@
178 ++A
179 ++B
180 +diff --git a/file0 b/file0
181 +new file mode 100644
182 +index 0000000..01e79c3
183 +--- /dev/null
184 ++++ b/file0
185 +@@ -0,0 +1,3 @@
186 ++1
187 ++2
188 ++3
189 +diff --git a/file2 b/file2
190 +new file mode 100644
191 +index 0000000..01e79c3
192 +--- /dev/null
193 ++++ b/file2
194 +@@ -0,0 +1,3 @@
195 ++1
196 ++2
197 ++3
198 +$
t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master new
+198
@@ -0,0 +1,198 @@
1 +$ git whatchanged --root -c --patch-with-stat --summary master
2 +commit 176b998f5d647cbd77a9d8acf4531e930754d16d
3 +Merge: 889b315... c7a2ab9...
4 +Author: A U Thor <author@example.com>
5 +Date: Mon Jun 26 00:04:00 2006 +0000
6 +
7 + Merge branch 'side'
8 +---
9 + dir/sub | 2 ++
10 + file0 | 3 +++
11 + 2 files changed, 5 insertions(+), 0 deletions(-)
12 +
13 +
14 +diff --combined dir/sub
15 +index cead32e,7289e35..992913c
16 +--- a/dir/sub
17 ++++ b/dir/sub
18 +@@@ -1,6 -1,4 +1,8 @@@
19 + A
20 + B
21 + +C
22 + +D
23 + +E
24 + +F
25 ++ 1
26 ++ 2
27 +diff --combined file0
28 +index b414108,f4615da..10a8a9f
29 +--- a/file0
30 ++++ b/file0
31 +@@@ -1,6 -1,6 +1,9 @@@
32 + 1
33 + 2
34 + 3
35 + +4
36 + +5
37 + +6
38 ++ A
39 ++ B
40 ++ C
41 +
42 +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
43 +Author: A U Thor <author@example.com>
44 +Date: Mon Jun 26 00:03:00 2006 +0000
45 +
46 + Side
47 +---
48 + dir/sub | 2 ++
49 + file0 | 3 +++
50 + file3 | 4 ++++
51 + 3 files changed, 9 insertions(+), 0 deletions(-)
52 + create mode 100644 file3
53 +
54 +diff --git a/dir/sub b/dir/sub
55 +index 35d242b..7289e35 100644
56 +--- a/dir/sub
57 ++++ b/dir/sub
58 +@@ -1,2 +1,4 @@
59 + A
60 + B
61 ++1
62 ++2
63 +diff --git a/file0 b/file0
64 +index 01e79c3..f4615da 100644
65 +--- a/file0
66 ++++ b/file0
67 +@@ -1,3 +1,6 @@
68 + 1
69 + 2
70 + 3
71 ++A
72 ++B
73 ++C
74 +diff --git a/file3 b/file3
75 +new file mode 100644
76 +index 0000000..7289e35
77 +--- /dev/null
78 ++++ b/file3
79 +@@ -0,0 +1,4 @@
80 ++A
81 ++B
82 ++1
83 ++2
84 +
85 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
86 +Author: A U Thor <author@example.com>
87 +Date: Mon Jun 26 00:02:00 2006 +0000
88 +
89 + Third
90 +---
91 + dir/sub | 2 ++
92 + file1 | 3 +++
93 + 2 files changed, 5 insertions(+), 0 deletions(-)
94 + create mode 100644 file1
95 +
96 +diff --git a/dir/sub b/dir/sub
97 +index 8422d40..cead32e 100644
98 +--- a/dir/sub
99 ++++ b/dir/sub
100 +@@ -2,3 +2,5 @@ A
101 + B
102 + C
103 + D
104 ++E
105 ++F
106 +diff --git a/file1 b/file1
107 +new file mode 100644
108 +index 0000000..b1e6722
109 +--- /dev/null
110 ++++ b/file1
111 +@@ -0,0 +1,3 @@
112 ++A
113 ++B
114 ++C
115 +
116 +commit 7952a93e09bf565b5592766a438b40cd81f4846f
117 +Author: A U Thor <author@example.com>
118 +Date: Mon Jun 26 00:01:00 2006 +0000
119 +
120 + Second
121 +---
122 + dir/sub | 2 ++
123 + file0 | 3 +++
124 + file2 | 3 ---
125 + 3 files changed, 5 insertions(+), 3 deletions(-)
126 + delete mode 100644 file2
127 +
128 +diff --git a/dir/sub b/dir/sub
129 +index 35d242b..8422d40 100644
130 +--- a/dir/sub
131 ++++ b/dir/sub
132 +@@ -1,2 +1,4 @@
133 + A
134 + B
135 ++C
136 ++D
137 +diff --git a/file0 b/file0
138 +index 01e79c3..b414108 100644
139 +--- a/file0
140 ++++ b/file0
141 +@@ -1,3 +1,6 @@
142 + 1
143 + 2
144 + 3
145 ++4
146 ++5
147 ++6
148 +diff --git a/file2 b/file2
149 +deleted file mode 100644
150 +index 01e79c3..0000000
151 +--- a/file2
152 ++++ /dev/null
153 +@@ -1,3 +0,0 @@
154 +-1
155 +-2
156 +-3
157 +
158 +commit 444ac553ac7612cc88969031b02b3767fb8a353a
159 +Author: A U Thor <author@example.com>
160 +Date: Mon Jun 26 00:00:00 2006 +0000
161 +
162 + Initial
163 +---
164 + dir/sub | 2 ++
165 + file0 | 3 +++
166 + file2 | 3 +++
167 + 3 files changed, 8 insertions(+), 0 deletions(-)
168 + create mode 100644 dir/sub
169 + create mode 100644 file0
170 + create mode 100644 file2
171 +
172 +diff --git a/dir/sub b/dir/sub
173 +new file mode 100644
174 +index 0000000..35d242b
175 +--- /dev/null
176 ++++ b/dir/sub
177 +@@ -0,0 +1,2 @@
178 ++A
179 ++B
180 +diff --git a/file0 b/file0
181 +new file mode 100644
182 +index 0000000..01e79c3
183 +--- /dev/null
184 ++++ b/file0
185 +@@ -0,0 +1,3 @@
186 ++1
187 ++2
188 ++3
189 +diff --git a/file2 b/file2
190 +new file mode 100644
191 +index 0000000..01e79c3
192 +--- /dev/null
193 ++++ b/file2
194 +@@ -0,0 +1,3 @@
195 ++1
196 ++2
197 ++3
198 +$
t/t4013/diff.whatchanged_-SF_-p_master new
+18
@@ -0,0 +1,18 @@
1 +$ git whatchanged -SF -p master
2 +commit 889b315013ef9f2e2f90aa0b054b267c8a557847
3 +Author: A U Thor <author@example.com>
4 +Date: Mon Jun 26 00:02:00 2006 +0000
5 +
6 + Third
7 +
8 +diff --git a/dir/sub b/dir/sub
9 +index 8422d40..cead32e 100644
10 +--- a/dir/sub
11 ++++ b/dir/sub
12 +@@ -2,3 +2,5 @@ A
13 + B
14 + C
15 + D
16 ++E
17 ++F
18 +$