t4013: add tests for diff/log family output options.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jun 26, 2006 at 13:46 UTC
3c2f75b590c35675cc67dc43cabe2298bec86afc
72 files changed
+2579
t/t4013-diff-various.sh
new
+202
@@ -0,0 +1,202 @@
1
+#!/bin/sh
2
+#
3
+# Copyright (c) 2006 Junio C Hamano
4
+#
5
+
6
+test_description='Various diff formatting options'
7
+
8
+. ./test-lib.sh
9
+
10
+test_expect_success setup '
11
+
12
+ GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
13
+ GIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&
14
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
15
+
16
+ mkdir dir &&
17
+ for i in 1 2 3; do echo $i; done >file0 &&
18
+ for i in A B; do echo $i; done >dir/sub &&
19
+ cat file0 >file2 &&
20
+ git add file0 file2 dir/sub &&
21
+ git commit -m Initial &&
22
+
23
+ git branch initial &&
24
+ git branch side &&
25
+
26
+ GIT_AUTHOR_DATE="2006-06-26 00:01:00 +0000" &&
27
+ GIT_COMMITTER_DATE="2006-06-26 00:01:00 +0000" &&
28
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
29
+
30
+ for i in 4 5 6; do echo $i; done >>file0 &&
31
+ for i in C D; do echo $i; done >>dir/sub &&
32
+ rm -f file2 &&
33
+ git update-index --remove file0 file2 dir/sub &&
34
+ git commit -m Second &&
35
+
36
+ GIT_AUTHOR_DATE="2006-06-26 00:02:00 +0000" &&
37
+ GIT_COMMITTER_DATE="2006-06-26 00:02:00 +0000" &&
38
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
39
+
40
+ for i in A B C; do echo $i; done >file1 &&
41
+ git add file1 &&
42
+ for i in E F; do echo $i; done >>dir/sub &&
43
+ git update-index dir/sub &&
44
+ git commit -m Third &&
45
+
46
+ GIT_AUTHOR_DATE="2006-06-26 00:03:00 +0000" &&
47
+ GIT_COMMITTER_DATE="2006-06-26 00:03:00 +0000" &&
48
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
49
+
50
+ git checkout side &&
51
+ for i in A B C; do echo $i; done >>file0 &&
52
+ for i in 1 2; do echo $i; done >>dir/sub &&
53
+ cat dir/sub >file3 &&
54
+ git add file3 &&
55
+ git update-index file0 dir/sub &&
56
+ git commit -m Side &&
57
+
58
+ GIT_AUTHOR_DATE="2006-06-26 00:04:00 +0000" &&
59
+ GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" &&
60
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
61
+
62
+ git checkout master &&
63
+ git pull -s ours . side &&
64
+
65
+ GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" &&
66
+ GIT_COMMITTER_DATE="2006-06-26 00:05:00 +0000" &&
67
+ export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
68
+
69
+ for i in A B C; do echo $i; done >>file0 &&
70
+ for i in 1 2; do echo $i; done >>dir/sub &&
71
+ git update-index file0 dir/sub &&
72
+
73
+ EDITOR=: VISUAL=: git commit --amend &&
74
+ git show-branch
75
+'
76
+
77
+: <<\EOF
78
+! [initial] Initial
79
+ * [master] Merge branch 'side'
80
+ ! [side] Side
81
+---
82
+ - [master] Merge branch 'side'
83
+ *+ [side] Side
84
+ * [master^] Second
85
++*+ [initial] Initial
86
+EOF
87
+
88
+while read cmd
89
+do
90
+ case "$cmd" in
91
+ '' | '#'*) continue ;;
92
+ esac
93
+ test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
94
+ cnt=`expr $test_count + 1`
95
+ pfx=`printf "%04d" $cnt`
96
+ expect="../t4013/diff.$test"
97
+ actual="$pfx-diff.$test"
98
+
99
+ test_expect_success "git $cmd" '
100
+ {
101
+ echo "\$ git $cmd"
102
+ git $cmd
103
+ echo "\$"
104
+ } >"$actual" &&
105
+ if test -f "$expect"
106
+ then
107
+ diff -u "$expect" "$actual" &&
108
+ rm -f "$actual"
109
+ else
110
+ # this is to help developing new tests.
111
+ cp "$actual" "$expect"
112
+ false
113
+ fi
114
+ '
115
+done <<\EOF
116
+diff-tree initial
117
+diff-tree -r initial
118
+diff-tree -r --abbrev initial
119
+diff-tree -r --abbrev=4 initial
120
+diff-tree --root initial
121
+diff-tree --root --abbrev initial
122
+diff-tree --root -r initial
123
+diff-tree --root -r --abbrev initial
124
+diff-tree --root -r --abbrev=4 initial
125
+diff-tree -p initial
126
+diff-tree --root -p initial
127
+diff-tree --patch-with-stat initial
128
+diff-tree --root --patch-with-stat initial
129
+diff-tree --patch-with-raw initial
130
+diff-tree --root --patch-with-raw initial
131
+
132
+diff-tree --pretty initial
133
+diff-tree --pretty --root initial
134
+diff-tree --pretty -p initial
135
+diff-tree --pretty --stat initial
136
+diff-tree --pretty --summary initial
137
+diff-tree --pretty --stat --summary initial
138
+diff-tree --pretty --root -p initial
139
+diff-tree --pretty --root --stat initial
140
+#diff-tree --pretty --root --summary initial
141
+diff-tree --pretty --root --stat --summary initial
142
+diff-tree --pretty --patch-with-stat initial
143
+diff-tree --pretty --root --patch-with-stat initial
144
+diff-tree --pretty --patch-with-raw initial
145
+diff-tree --pretty --root --patch-with-raw initial
146
+
147
+diff-tree --pretty=oneline initial
148
+diff-tree --pretty=oneline --root initial
149
+diff-tree --pretty=oneline -p initial
150
+diff-tree --pretty=oneline --root -p initial
151
+diff-tree --pretty=oneline --patch-with-stat initial
152
+diff-tree --pretty=oneline --root --patch-with-stat initial
153
+diff-tree --pretty=oneline --patch-with-raw initial
154
+diff-tree --pretty=oneline --root --patch-with-raw initial
155
+
156
+diff-tree --pretty side
157
+diff-tree --pretty -p side
158
+diff-tree --pretty --patch-with-stat side
159
+
160
+diff-tree master
161
+diff-tree -p master
162
+diff-tree -p -m master
163
+diff-tree -c master
164
+diff-tree -c --abbrev master
165
+diff-tree --cc master
166
+
167
+log master
168
+log -p master
169
+log --root master
170
+log --root -p master
171
+log --patch-with-stat master
172
+log --root --patch-with-stat master
173
+#log --root --patch-with-stat --summary master
174
+log -SF master
175
+
176
+whatchanged master
177
+whatchanged -p master
178
+whatchanged --root master
179
+whatchanged --root -p master
180
+whatchanged --patch-with-stat master
181
+whatchanged --root --patch-with-stat master
182
+whatchanged --root --patch-with-stat --summary master
183
+whatchanged -SF master
184
+
185
+log --patch-with-stat master -- dir/
186
+whatchanged --patch-with-stat master -- dir/
187
+
188
+show initial
189
+show --root initial
190
+show side
191
+show master
192
+show --stat side
193
+show --stat --summary side
194
+show --patch-with-stat side
195
+show --patch-with-raw side
196
+show --patch-with-stat --summary side
197
+
198
+
199
+
200
+EOF
201
+
202
+test_done
t/t4013/diff.diff-tree_--cc_master
new
+30
@@ -0,0 +1,30 @@
1
+$ git diff-tree --cc master
2
+176b998f5d647cbd77a9d8acf4531e930754d16d
3
+diff --cc dir/sub
4
+index cead32e,7289e35..992913c
5
+--- a/dir/sub
6
++++ b/dir/sub
7
+@@@ -1,6 -1,4 +1,8 @@@
8
+ A
9
+ B
10
+ +C
11
+ +D
12
+ +E
13
+ +F
14
++ 1
15
++ 2
16
+diff --cc file0
17
+index b414108,f4615da..10a8a9f
18
+--- a/file0
19
++++ b/file0
20
+@@@ -1,6 -1,6 +1,9 @@@
21
+ 1
22
+ 2
23
+ 3
24
+ +4
25
+ +5
26
+ +6
27
++ A
28
++ B
29
++ C
30
+$
t/t4013/diff.diff-tree_--patch-with-raw_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --patch-with-raw initial
2
+$
t/t4013/diff.diff-tree_--patch-with-stat_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --patch-with-stat initial
2
+$
t/t4013/diff.diff-tree_--pretty=oneline_--patch-with-raw_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty=oneline --patch-with-raw initial
2
+$
t/t4013/diff.diff-tree_--pretty=oneline_--patch-with-stat_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty=oneline --patch-with-stat initial
2
+$
t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial
new
+33
@@ -0,0 +1,33 @@
1
+$ git diff-tree --pretty=oneline --root --patch-with-raw initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a Initial
3
+:000000 100644 0000000000000000000000000000000000000000 35d242ba79ae89ac695e26b3d4c27a8e6f028f9e A dir/sub
4
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
5
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
6
+
7
+diff --git a/dir/sub b/dir/sub
8
+new file mode 100644
9
+index 0000000..35d242b
10
+--- /dev/null
11
++++ b/dir/sub
12
+@@ -0,0 +1,2 @@
13
++A
14
++B
15
+diff --git a/file0 b/file0
16
+new file mode 100644
17
+index 0000000..01e79c3
18
+--- /dev/null
19
++++ b/file0
20
+@@ -0,0 +1,3 @@
21
++1
22
++2
23
++3
24
+diff --git a/file2 b/file2
25
+new file mode 100644
26
+index 0000000..01e79c3
27
+--- /dev/null
28
++++ b/file2
29
+@@ -0,0 +1,3 @@
30
++1
31
++2
32
++3
33
+$
t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
new
+35
@@ -0,0 +1,35 @@
1
+$ git diff-tree --pretty=oneline --root --patch-with-stat initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a Initial
3
+---
4
+ dir/sub | 2 ++
5
+ file0 | 3 +++
6
+ file2 | 3 +++
7
+ 3 files changed, 8 insertions(+), 0 deletions(-)
8
+
9
+diff --git a/dir/sub b/dir/sub
10
+new file mode 100644
11
+index 0000000..35d242b
12
+--- /dev/null
13
++++ b/dir/sub
14
+@@ -0,0 +1,2 @@
15
++A
16
++B
17
+diff --git a/file0 b/file0
18
+new file mode 100644
19
+index 0000000..01e79c3
20
+--- /dev/null
21
++++ b/file0
22
+@@ -0,0 +1,3 @@
23
++1
24
++2
25
++3
26
+diff --git a/file2 b/file2
27
+new file mode 100644
28
+index 0000000..01e79c3
29
+--- /dev/null
30
++++ b/file2
31
+@@ -0,0 +1,3 @@
32
++1
33
++2
34
++3
35
+$
t/t4013/diff.diff-tree_--pretty=oneline_--root_-p_initial
new
+29
@@ -0,0 +1,29 @@
1
+$ git diff-tree --pretty=oneline --root -p initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a Initial
3
+diff --git a/dir/sub b/dir/sub
4
+new file mode 100644
5
+index 0000000..35d242b
6
+--- /dev/null
7
++++ b/dir/sub
8
+@@ -0,0 +1,2 @@
9
++A
10
++B
11
+diff --git a/file0 b/file0
12
+new file mode 100644
13
+index 0000000..01e79c3
14
+--- /dev/null
15
++++ b/file0
16
+@@ -0,0 +1,3 @@
17
++1
18
++2
19
++3
20
+diff --git a/file2 b/file2
21
+new file mode 100644
22
+index 0000000..01e79c3
23
+--- /dev/null
24
++++ b/file2
25
+@@ -0,0 +1,3 @@
26
++1
27
++2
28
++3
29
+$
t/t4013/diff.diff-tree_--pretty=oneline_--root_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --pretty=oneline --root initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a Initial
3
+:000000 040000 0000000000000000000000000000000000000000 da7a33fa77d8066d6698643940ce5860fe2d7fb3 A dir
4
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
5
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
6
+$
t/t4013/diff.diff-tree_--pretty=oneline_-p_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty=oneline -p initial
2
+$
t/t4013/diff.diff-tree_--pretty=oneline_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty=oneline initial
2
+$
t/t4013/diff.diff-tree_--pretty_--patch-with-raw_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty --patch-with-raw initial
2
+$
t/t4013/diff.diff-tree_--pretty_--patch-with-stat_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty --patch-with-stat initial
2
+$
t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side
new
+43
@@ -0,0 +1,43 @@
1
+$ git diff-tree --pretty --patch-with-stat side
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+
13
+diff --git a/dir/sub b/dir/sub
14
+index 35d242b..7289e35 100644
15
+--- a/dir/sub
16
++++ b/dir/sub
17
+@@ -1,2 +1,4 @@
18
+ A
19
+ B
20
++1
21
++2
22
+diff --git a/file0 b/file0
23
+index 01e79c3..f4615da 100644
24
+--- a/file0
25
++++ b/file0
26
+@@ -1,3 +1,6 @@
27
+ 1
28
+ 2
29
+ 3
30
++A
31
++B
32
++C
33
+diff --git a/file3 b/file3
34
+new file mode 100644
35
+index 0000000..7289e35
36
+--- /dev/null
37
++++ b/file3
38
+@@ -0,0 +1,4 @@
39
++A
40
++B
41
++1
42
++2
43
+$
t/t4013/diff.diff-tree_--pretty_--root_--patch-with-raw_initial
new
+38
@@ -0,0 +1,38 @@
1
+$ git diff-tree --pretty --root --patch-with-raw initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+:000000 100644 0000000000000000000000000000000000000000 35d242ba79ae89ac695e26b3d4c27a8e6f028f9e A dir/sub
9
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
10
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
11
+
12
+diff --git a/dir/sub b/dir/sub
13
+new file mode 100644
14
+index 0000000..35d242b
15
+--- /dev/null
16
++++ b/dir/sub
17
+@@ -0,0 +1,2 @@
18
++A
19
++B
20
+diff --git a/file0 b/file0
21
+new file mode 100644
22
+index 0000000..01e79c3
23
+--- /dev/null
24
++++ b/file0
25
+@@ -0,0 +1,3 @@
26
++1
27
++2
28
++3
29
+diff --git a/file2 b/file2
30
+new file mode 100644
31
+index 0000000..01e79c3
32
+--- /dev/null
33
++++ b/file2
34
+@@ -0,0 +1,3 @@
35
++1
36
++2
37
++3
38
+$
t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial
new
+39
@@ -0,0 +1,39 @@
1
+$ git diff-tree --pretty --root --patch-with-stat initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+---
8
+ dir/sub | 2 ++
9
+ file0 | 3 +++
10
+ file2 | 3 +++
11
+ 3 files changed, 8 insertions(+), 0 deletions(-)
12
+
13
+diff --git a/dir/sub b/dir/sub
14
+new file mode 100644
15
+index 0000000..35d242b
16
+--- /dev/null
17
++++ b/dir/sub
18
+@@ -0,0 +1,2 @@
19
++A
20
++B
21
+diff --git a/file0 b/file0
22
+new file mode 100644
23
+index 0000000..01e79c3
24
+--- /dev/null
25
++++ b/file0
26
+@@ -0,0 +1,3 @@
27
++1
28
++2
29
++3
30
+diff --git a/file2 b/file2
31
+new file mode 100644
32
+index 0000000..01e79c3
33
+--- /dev/null
34
++++ b/file2
35
+@@ -0,0 +1,3 @@
36
++1
37
++2
38
++3
39
+$
t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial
new
+15
@@ -0,0 +1,15 @@
1
+$ git diff-tree --pretty --root --stat --summary initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+ dir/sub | 2 ++
9
+ file0 | 3 +++
10
+ file2 | 3 +++
11
+ 3 files changed, 8 insertions(+), 0 deletions(-)
12
+ create mode 100644 dir/sub
13
+ create mode 100644 file0
14
+ create mode 100644 file2
15
+$
t/t4013/diff.diff-tree_--pretty_--root_--stat_initial
new
+12
@@ -0,0 +1,12 @@
1
+$ git diff-tree --pretty --root --stat initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+ dir/sub | 2 ++
9
+ file0 | 3 +++
10
+ file2 | 3 +++
11
+ 3 files changed, 8 insertions(+), 0 deletions(-)
12
+$
t/t4013/diff.diff-tree_--pretty_--root_-p_initial
new
+34
@@ -0,0 +1,34 @@
1
+$ git diff-tree --pretty --root -p initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+diff --git a/dir/sub b/dir/sub
9
+new file mode 100644
10
+index 0000000..35d242b
11
+--- /dev/null
12
++++ b/dir/sub
13
+@@ -0,0 +1,2 @@
14
++A
15
++B
16
+diff --git a/file0 b/file0
17
+new file mode 100644
18
+index 0000000..01e79c3
19
+--- /dev/null
20
++++ b/file0
21
+@@ -0,0 +1,3 @@
22
++1
23
++2
24
++3
25
+diff --git a/file2 b/file2
26
+new file mode 100644
27
+index 0000000..01e79c3
28
+--- /dev/null
29
++++ b/file2
30
+@@ -0,0 +1,3 @@
31
++1
32
++2
33
++3
34
+$
t/t4013/diff.diff-tree_--pretty_--root_initial
new
+11
@@ -0,0 +1,11 @@
1
+$ git diff-tree --pretty --root initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+:000000 040000 0000000000000000000000000000000000000000 da7a33fa77d8066d6698643940ce5860fe2d7fb3 A dir
9
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
10
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
11
+$
t/t4013/diff.diff-tree_--pretty_--stat_--summary_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty --stat --summary initial
2
+$
t/t4013/diff.diff-tree_--pretty_--stat_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty --stat initial
2
+$
t/t4013/diff.diff-tree_--pretty_--summary_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty --summary initial
2
+$
t/t4013/diff.diff-tree_--pretty_-p_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty -p initial
2
+$
t/t4013/diff.diff-tree_--pretty_-p_side
new
+38
@@ -0,0 +1,38 @@
1
+$ git diff-tree --pretty -p side
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
+diff --git a/dir/sub b/dir/sub
9
+index 35d242b..7289e35 100644
10
+--- a/dir/sub
11
++++ b/dir/sub
12
+@@ -1,2 +1,4 @@
13
+ A
14
+ B
15
++1
16
++2
17
+diff --git a/file0 b/file0
18
+index 01e79c3..f4615da 100644
19
+--- a/file0
20
++++ b/file0
21
+@@ -1,3 +1,6 @@
22
+ 1
23
+ 2
24
+ 3
25
++A
26
++B
27
++C
28
+diff --git a/file3 b/file3
29
+new file mode 100644
30
+index 0000000..7289e35
31
+--- /dev/null
32
++++ b/file3
33
+@@ -0,0 +1,4 @@
34
++A
35
++B
36
++1
37
++2
38
+$
t/t4013/diff.diff-tree_--pretty_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree --pretty initial
2
+$
t/t4013/diff.diff-tree_--pretty_side
new
+11
@@ -0,0 +1,11 @@
1
+$ git diff-tree --pretty side
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
+:040000 040000 da7a33fa77d8066d6698643940ce5860fe2d7fb3 f977ed46ae6873c1c30ab878e15a4accedc3618b M dir
9
+:100644 100644 01e79c32a8c99c557f0757da7cb6d65b3414466d f4615da674c09df322d6ba8d6b21ecfb1b1ba510 M file0
10
+:000000 100644 0000000000000000000000000000000000000000 7289e35bff32727c08dda207511bec138fdb9ea5 A file3
11
+$
t/t4013/diff.diff-tree_--root_--abbrev_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --root --abbrev initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 040000 0000000... da7a33f... A dir
4
+:000000 100644 0000000... 01e79c3... A file0
5
+:000000 100644 0000000... 01e79c3... A file2
6
+$
t/t4013/diff.diff-tree_--root_--patch-with-raw_initial
new
+33
@@ -0,0 +1,33 @@
1
+$ git diff-tree --root --patch-with-raw initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 100644 0000000000000000000000000000000000000000 35d242ba79ae89ac695e26b3d4c27a8e6f028f9e A dir/sub
4
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
5
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
6
+
7
+diff --git a/dir/sub b/dir/sub
8
+new file mode 100644
9
+index 0000000..35d242b
10
+--- /dev/null
11
++++ b/dir/sub
12
+@@ -0,0 +1,2 @@
13
++A
14
++B
15
+diff --git a/file0 b/file0
16
+new file mode 100644
17
+index 0000000..01e79c3
18
+--- /dev/null
19
++++ b/file0
20
+@@ -0,0 +1,3 @@
21
++1
22
++2
23
++3
24
+diff --git a/file2 b/file2
25
+new file mode 100644
26
+index 0000000..01e79c3
27
+--- /dev/null
28
++++ b/file2
29
+@@ -0,0 +1,3 @@
30
++1
31
++2
32
++3
33
+$
t/t4013/diff.diff-tree_--root_--patch-with-stat_initial
new
+34
@@ -0,0 +1,34 @@
1
+$ git diff-tree --root --patch-with-stat initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+ dir/sub | 2 ++
4
+ file0 | 3 +++
5
+ file2 | 3 +++
6
+ 3 files changed, 8 insertions(+), 0 deletions(-)
7
+
8
+diff --git a/dir/sub b/dir/sub
9
+new file mode 100644
10
+index 0000000..35d242b
11
+--- /dev/null
12
++++ b/dir/sub
13
+@@ -0,0 +1,2 @@
14
++A
15
++B
16
+diff --git a/file0 b/file0
17
+new file mode 100644
18
+index 0000000..01e79c3
19
+--- /dev/null
20
++++ b/file0
21
+@@ -0,0 +1,3 @@
22
++1
23
++2
24
++3
25
+diff --git a/file2 b/file2
26
+new file mode 100644
27
+index 0000000..01e79c3
28
+--- /dev/null
29
++++ b/file2
30
+@@ -0,0 +1,3 @@
31
++1
32
++2
33
++3
34
+$
t/t4013/diff.diff-tree_--root_-p_initial
new
+29
@@ -0,0 +1,29 @@
1
+$ git diff-tree --root -p initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+diff --git a/dir/sub b/dir/sub
4
+new file mode 100644
5
+index 0000000..35d242b
6
+--- /dev/null
7
++++ b/dir/sub
8
+@@ -0,0 +1,2 @@
9
++A
10
++B
11
+diff --git a/file0 b/file0
12
+new file mode 100644
13
+index 0000000..01e79c3
14
+--- /dev/null
15
++++ b/file0
16
+@@ -0,0 +1,3 @@
17
++1
18
++2
19
++3
20
+diff --git a/file2 b/file2
21
+new file mode 100644
22
+index 0000000..01e79c3
23
+--- /dev/null
24
++++ b/file2
25
+@@ -0,0 +1,3 @@
26
++1
27
++2
28
++3
29
+$
t/t4013/diff.diff-tree_--root_-r_--abbrev=4_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --root -r --abbrev=4 initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 100644 0000... 35d2... A dir/sub
4
+:000000 100644 0000... 01e7... A file0
5
+:000000 100644 0000... 01e7... A file2
6
+$
t/t4013/diff.diff-tree_--root_-r_--abbrev_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --root -r --abbrev initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 100644 0000000... 35d242b... A dir/sub
4
+:000000 100644 0000000... 01e79c3... A file0
5
+:000000 100644 0000000... 01e79c3... A file2
6
+$
t/t4013/diff.diff-tree_--root_-r_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --root -r initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 100644 0000000000000000000000000000000000000000 35d242ba79ae89ac695e26b3d4c27a8e6f028f9e A dir/sub
4
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
5
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
6
+$
t/t4013/diff.diff-tree_--root_initial
new
+6
@@ -0,0 +1,6 @@
1
+$ git diff-tree --root initial
2
+444ac553ac7612cc88969031b02b3767fb8a353a
3
+:000000 040000 0000000000000000000000000000000000000000 da7a33fa77d8066d6698643940ce5860fe2d7fb3 A dir
4
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file0
5
+:000000 100644 0000000000000000000000000000000000000000 01e79c32a8c99c557f0757da7cb6d65b3414466d A file2
6
+$
t/t4013/diff.diff-tree_-c_--abbrev_master
new
+5
@@ -0,0 +1,5 @@
1
+$ git diff-tree -c --abbrev master
2
+176b998f5d647cbd77a9d8acf4531e930754d16d
3
+::100644 100644 100644 cead32e... 7289e35... 992913c... MM dir/sub
4
+::100644 100644 100644 b414108... f4615da... 10a8a9f... MM file0
5
+$
t/t4013/diff.diff-tree_-c_master
new
+5
@@ -0,0 +1,5 @@
1
+$ git diff-tree -c master
2
+176b998f5d647cbd77a9d8acf4531e930754d16d
3
+::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM dir/sub
4
+::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM file0
5
+$
t/t4013/diff.diff-tree_-p_-m_master
new
+80
@@ -0,0 +1,80 @@
1
+$ git diff-tree -p -m master
2
+176b998f5d647cbd77a9d8acf4531e930754d16d
3
+diff --git a/dir/sub b/dir/sub
4
+index cead32e..992913c 100644
5
+--- a/dir/sub
6
++++ b/dir/sub
7
+@@ -4,3 +4,5 @@ C
8
+ D
9
+ E
10
+ F
11
++1
12
++2
13
+diff --git a/file0 b/file0
14
+index b414108..10a8a9f 100644
15
+--- a/file0
16
++++ b/file0
17
+@@ -4,3 +4,6 @@
18
+ 4
19
+ 5
20
+ 6
21
++A
22
++B
23
++C
24
+176b998f5d647cbd77a9d8acf4531e930754d16d
25
+diff --git a/dir/sub b/dir/sub
26
+index 7289e35..992913c 100644
27
+--- a/dir/sub
28
++++ b/dir/sub
29
+@@ -1,4 +1,8 @@
30
+ A
31
+ B
32
++C
33
++D
34
++E
35
++F
36
+ 1
37
+ 2
38
+diff --git a/file0 b/file0
39
+index f4615da..10a8a9f 100644
40
+--- a/file0
41
++++ b/file0
42
+@@ -1,6 +1,9 @@
43
+ 1
44
+ 2
45
+ 3
46
++4
47
++5
48
++6
49
+ A
50
+ B
51
+ C
52
+diff --git a/file1 b/file1
53
+new file mode 100644
54
+index 0000000..b1e6722
55
+--- /dev/null
56
++++ b/file1
57
+@@ -0,0 +1,3 @@
58
++A
59
++B
60
++C
61
+diff --git a/file2 b/file2
62
+deleted file mode 100644
63
+index 01e79c3..0000000
64
+--- a/file2
65
++++ /dev/null
66
+@@ -1,3 +0,0 @@
67
+-1
68
+-2
69
+-3
70
+diff --git a/file3 b/file3
71
+deleted file mode 100644
72
+index 7289e35..0000000
73
+--- a/file3
74
++++ /dev/null
75
+@@ -1,4 +0,0 @@
76
+-A
77
+-B
78
+-1
79
+-2
80
+$
t/t4013/diff.diff-tree_-p_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree -p initial
2
+$
t/t4013/diff.diff-tree_-p_master
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree -p master
2
+$
t/t4013/diff.diff-tree_-r_--abbrev=4_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree -r --abbrev=4 initial
2
+$
t/t4013/diff.diff-tree_-r_--abbrev_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree -r --abbrev initial
2
+$
t/t4013/diff.diff-tree_-r_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree -r initial
2
+$
t/t4013/diff.diff-tree_initial
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree initial
2
+$
t/t4013/diff.diff-tree_master
new
+2
@@ -0,0 +1,2 @@
1
+$ git diff-tree master
2
+$
t/t4013/diff.log_--patch-with-stat_master
new
+127
@@ -0,0 +1,127 @@
1
+$ git log --patch-with-stat 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
+
20
+diff --git a/dir/sub b/dir/sub
21
+index 35d242b..7289e35 100644
22
+--- a/dir/sub
23
++++ b/dir/sub
24
+@@ -1,2 +1,4 @@
25
+ A
26
+ B
27
++1
28
++2
29
+diff --git a/file0 b/file0
30
+index 01e79c3..f4615da 100644
31
+--- a/file0
32
++++ b/file0
33
+@@ -1,3 +1,6 @@
34
+ 1
35
+ 2
36
+ 3
37
++A
38
++B
39
++C
40
+diff --git a/file3 b/file3
41
+new file mode 100644
42
+index 0000000..7289e35
43
+--- /dev/null
44
++++ b/file3
45
+@@ -0,0 +1,4 @@
46
++A
47
++B
48
++1
49
++2
50
+
51
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
52
+Author: A U Thor <author@example.com>
53
+Date: Mon Jun 26 00:02:00 2006 +0000
54
+
55
+ Third
56
+---
57
+ dir/sub | 2 ++
58
+ file1 | 3 +++
59
+ 2 files changed, 5 insertions(+), 0 deletions(-)
60
+
61
+diff --git a/dir/sub b/dir/sub
62
+index 8422d40..cead32e 100644
63
+--- a/dir/sub
64
++++ b/dir/sub
65
+@@ -2,3 +2,5 @@ A
66
+ B
67
+ C
68
+ D
69
++E
70
++F
71
+diff --git a/file1 b/file1
72
+new file mode 100644
73
+index 0000000..b1e6722
74
+--- /dev/null
75
++++ b/file1
76
+@@ -0,0 +1,3 @@
77
++A
78
++B
79
++C
80
+
81
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
82
+Author: A U Thor <author@example.com>
83
+Date: Mon Jun 26 00:01:00 2006 +0000
84
+
85
+ Second
86
+---
87
+ dir/sub | 2 ++
88
+ file0 | 3 +++
89
+ file2 | 3 ---
90
+ 3 files changed, 5 insertions(+), 3 deletions(-)
91
+
92
+diff --git a/dir/sub b/dir/sub
93
+index 35d242b..8422d40 100644
94
+--- a/dir/sub
95
++++ b/dir/sub
96
+@@ -1,2 +1,4 @@
97
+ A
98
+ B
99
++C
100
++D
101
+diff --git a/file0 b/file0
102
+index 01e79c3..b414108 100644
103
+--- a/file0
104
++++ b/file0
105
+@@ -1,3 +1,6 @@
106
+ 1
107
+ 2
108
+ 3
109
++4
110
++5
111
++6
112
+diff --git a/file2 b/file2
113
+deleted file mode 100644
114
+index 01e79c3..0000000
115
+--- a/file2
116
++++ /dev/null
117
+@@ -1,3 +0,0 @@
118
+-1
119
+-2
120
+-3
121
+
122
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
123
+Author: A U Thor <author@example.com>
124
+Date: Mon Jun 26 00:00:00 2006 +0000
125
+
126
+ Initial
127
+$
t/t4013/diff.log_--patch-with-stat_master_--_dir_
new
+72
@@ -0,0 +1,72 @@
1
+$ git log --patch-with-stat 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_--patch-with-stat_master
new
+159
@@ -0,0 +1,159 @@
1
+$ git log --root --patch-with-stat 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
+
20
+diff --git a/dir/sub b/dir/sub
21
+index 35d242b..7289e35 100644
22
+--- a/dir/sub
23
++++ b/dir/sub
24
+@@ -1,2 +1,4 @@
25
+ A
26
+ B
27
++1
28
++2
29
+diff --git a/file0 b/file0
30
+index 01e79c3..f4615da 100644
31
+--- a/file0
32
++++ b/file0
33
+@@ -1,3 +1,6 @@
34
+ 1
35
+ 2
36
+ 3
37
++A
38
++B
39
++C
40
+diff --git a/file3 b/file3
41
+new file mode 100644
42
+index 0000000..7289e35
43
+--- /dev/null
44
++++ b/file3
45
+@@ -0,0 +1,4 @@
46
++A
47
++B
48
++1
49
++2
50
+
51
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
52
+Author: A U Thor <author@example.com>
53
+Date: Mon Jun 26 00:02:00 2006 +0000
54
+
55
+ Third
56
+---
57
+ dir/sub | 2 ++
58
+ file1 | 3 +++
59
+ 2 files changed, 5 insertions(+), 0 deletions(-)
60
+
61
+diff --git a/dir/sub b/dir/sub
62
+index 8422d40..cead32e 100644
63
+--- a/dir/sub
64
++++ b/dir/sub
65
+@@ -2,3 +2,5 @@ A
66
+ B
67
+ C
68
+ D
69
++E
70
++F
71
+diff --git a/file1 b/file1
72
+new file mode 100644
73
+index 0000000..b1e6722
74
+--- /dev/null
75
++++ b/file1
76
+@@ -0,0 +1,3 @@
77
++A
78
++B
79
++C
80
+
81
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
82
+Author: A U Thor <author@example.com>
83
+Date: Mon Jun 26 00:01:00 2006 +0000
84
+
85
+ Second
86
+---
87
+ dir/sub | 2 ++
88
+ file0 | 3 +++
89
+ file2 | 3 ---
90
+ 3 files changed, 5 insertions(+), 3 deletions(-)
91
+
92
+diff --git a/dir/sub b/dir/sub
93
+index 35d242b..8422d40 100644
94
+--- a/dir/sub
95
++++ b/dir/sub
96
+@@ -1,2 +1,4 @@
97
+ A
98
+ B
99
++C
100
++D
101
+diff --git a/file0 b/file0
102
+index 01e79c3..b414108 100644
103
+--- a/file0
104
++++ b/file0
105
+@@ -1,3 +1,6 @@
106
+ 1
107
+ 2
108
+ 3
109
++4
110
++5
111
++6
112
+diff --git a/file2 b/file2
113
+deleted file mode 100644
114
+index 01e79c3..0000000
115
+--- a/file2
116
++++ /dev/null
117
+@@ -1,3 +0,0 @@
118
+-1
119
+-2
120
+-3
121
+
122
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
123
+Author: A U Thor <author@example.com>
124
+Date: Mon Jun 26 00:00:00 2006 +0000
125
+
126
+ Initial
127
+---
128
+ dir/sub | 2 ++
129
+ file0 | 3 +++
130
+ file2 | 3 +++
131
+ 3 files changed, 8 insertions(+), 0 deletions(-)
132
+
133
+diff --git a/dir/sub b/dir/sub
134
+new file mode 100644
135
+index 0000000..35d242b
136
+--- /dev/null
137
++++ b/dir/sub
138
+@@ -0,0 +1,2 @@
139
++A
140
++B
141
+diff --git a/file0 b/file0
142
+new file mode 100644
143
+index 0000000..01e79c3
144
+--- /dev/null
145
++++ b/file0
146
+@@ -0,0 +1,3 @@
147
++1
148
++2
149
++3
150
+diff --git a/file2 b/file2
151
+new file mode 100644
152
+index 0000000..01e79c3
153
+--- /dev/null
154
++++ b/file2
155
+@@ -0,0 +1,3 @@
156
++1
157
++2
158
++3
159
+$
t/t4013/diff.log_--root_-p_master
new
+140
@@ -0,0 +1,140 @@
1
+$ git log --root -p 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
+diff --git a/dir/sub b/dir/sub
16
+index 35d242b..7289e35 100644
17
+--- a/dir/sub
18
++++ b/dir/sub
19
+@@ -1,2 +1,4 @@
20
+ A
21
+ B
22
++1
23
++2
24
+diff --git a/file0 b/file0
25
+index 01e79c3..f4615da 100644
26
+--- a/file0
27
++++ b/file0
28
+@@ -1,3 +1,6 @@
29
+ 1
30
+ 2
31
+ 3
32
++A
33
++B
34
++C
35
+diff --git a/file3 b/file3
36
+new file mode 100644
37
+index 0000000..7289e35
38
+--- /dev/null
39
++++ b/file3
40
+@@ -0,0 +1,4 @@
41
++A
42
++B
43
++1
44
++2
45
+
46
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
47
+Author: A U Thor <author@example.com>
48
+Date: Mon Jun 26 00:02:00 2006 +0000
49
+
50
+ Third
51
+
52
+diff --git a/dir/sub b/dir/sub
53
+index 8422d40..cead32e 100644
54
+--- a/dir/sub
55
++++ b/dir/sub
56
+@@ -2,3 +2,5 @@ A
57
+ B
58
+ C
59
+ D
60
++E
61
++F
62
+diff --git a/file1 b/file1
63
+new file mode 100644
64
+index 0000000..b1e6722
65
+--- /dev/null
66
++++ b/file1
67
+@@ -0,0 +1,3 @@
68
++A
69
++B
70
++C
71
+
72
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
73
+Author: A U Thor <author@example.com>
74
+Date: Mon Jun 26 00:01:00 2006 +0000
75
+
76
+ Second
77
+
78
+diff --git a/dir/sub b/dir/sub
79
+index 35d242b..8422d40 100644
80
+--- a/dir/sub
81
++++ b/dir/sub
82
+@@ -1,2 +1,4 @@
83
+ A
84
+ B
85
++C
86
++D
87
+diff --git a/file0 b/file0
88
+index 01e79c3..b414108 100644
89
+--- a/file0
90
++++ b/file0
91
+@@ -1,3 +1,6 @@
92
+ 1
93
+ 2
94
+ 3
95
++4
96
++5
97
++6
98
+diff --git a/file2 b/file2
99
+deleted file mode 100644
100
+index 01e79c3..0000000
101
+--- a/file2
102
++++ /dev/null
103
+@@ -1,3 +0,0 @@
104
+-1
105
+-2
106
+-3
107
+
108
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
109
+Author: A U Thor <author@example.com>
110
+Date: Mon Jun 26 00:00:00 2006 +0000
111
+
112
+ Initial
113
+
114
+diff --git a/dir/sub b/dir/sub
115
+new file mode 100644
116
+index 0000000..35d242b
117
+--- /dev/null
118
++++ b/dir/sub
119
+@@ -0,0 +1,2 @@
120
++A
121
++B
122
+diff --git a/file0 b/file0
123
+new file mode 100644
124
+index 0000000..01e79c3
125
+--- /dev/null
126
++++ b/file0
127
+@@ -0,0 +1,3 @@
128
++1
129
++2
130
++3
131
+diff --git a/file2 b/file2
132
+new file mode 100644
133
+index 0000000..01e79c3
134
+--- /dev/null
135
++++ b/file2
136
+@@ -0,0 +1,3 @@
137
++1
138
++2
139
++3
140
+$
t/t4013/diff.log_--root_master
new
+32
@@ -0,0 +1,32 @@
1
+$ git log --root 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
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
16
+Author: A U Thor <author@example.com>
17
+Date: Mon Jun 26 00:02:00 2006 +0000
18
+
19
+ Third
20
+
21
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
22
+Author: A U Thor <author@example.com>
23
+Date: Mon Jun 26 00:01:00 2006 +0000
24
+
25
+ Second
26
+
27
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
28
+Author: A U Thor <author@example.com>
29
+Date: Mon Jun 26 00:00:00 2006 +0000
30
+
31
+ Initial
32
+$
t/t4013/diff.log_-SF_master
new
+8
@@ -0,0 +1,8 @@
1
+$ git log -SF 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
+$
t/t4013/diff.log_-p_master
new
+113
@@ -0,0 +1,113 @@
1
+$ git log -p 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
+diff --git a/dir/sub b/dir/sub
16
+index 35d242b..7289e35 100644
17
+--- a/dir/sub
18
++++ b/dir/sub
19
+@@ -1,2 +1,4 @@
20
+ A
21
+ B
22
++1
23
++2
24
+diff --git a/file0 b/file0
25
+index 01e79c3..f4615da 100644
26
+--- a/file0
27
++++ b/file0
28
+@@ -1,3 +1,6 @@
29
+ 1
30
+ 2
31
+ 3
32
++A
33
++B
34
++C
35
+diff --git a/file3 b/file3
36
+new file mode 100644
37
+index 0000000..7289e35
38
+--- /dev/null
39
++++ b/file3
40
+@@ -0,0 +1,4 @@
41
++A
42
++B
43
++1
44
++2
45
+
46
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
47
+Author: A U Thor <author@example.com>
48
+Date: Mon Jun 26 00:02:00 2006 +0000
49
+
50
+ Third
51
+
52
+diff --git a/dir/sub b/dir/sub
53
+index 8422d40..cead32e 100644
54
+--- a/dir/sub
55
++++ b/dir/sub
56
+@@ -2,3 +2,5 @@ A
57
+ B
58
+ C
59
+ D
60
++E
61
++F
62
+diff --git a/file1 b/file1
63
+new file mode 100644
64
+index 0000000..b1e6722
65
+--- /dev/null
66
++++ b/file1
67
+@@ -0,0 +1,3 @@
68
++A
69
++B
70
++C
71
+
72
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
73
+Author: A U Thor <author@example.com>
74
+Date: Mon Jun 26 00:01:00 2006 +0000
75
+
76
+ Second
77
+
78
+diff --git a/dir/sub b/dir/sub
79
+index 35d242b..8422d40 100644
80
+--- a/dir/sub
81
++++ b/dir/sub
82
+@@ -1,2 +1,4 @@
83
+ A
84
+ B
85
++C
86
++D
87
+diff --git a/file0 b/file0
88
+index 01e79c3..b414108 100644
89
+--- a/file0
90
++++ b/file0
91
+@@ -1,3 +1,6 @@
92
+ 1
93
+ 2
94
+ 3
95
++4
96
++5
97
++6
98
+diff --git a/file2 b/file2
99
+deleted file mode 100644
100
+index 01e79c3..0000000
101
+--- a/file2
102
++++ /dev/null
103
+@@ -1,3 +0,0 @@
104
+-1
105
+-2
106
+-3
107
+
108
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
109
+Author: A U Thor <author@example.com>
110
+Date: Mon Jun 26 00:00:00 2006 +0000
111
+
112
+ Initial
113
+$
t/t4013/diff.log_master
new
+32
@@ -0,0 +1,32 @@
1
+$ git log 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
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
16
+Author: A U Thor <author@example.com>
17
+Date: Mon Jun 26 00:02:00 2006 +0000
18
+
19
+ Third
20
+
21
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
22
+Author: A U Thor <author@example.com>
23
+Date: Mon Jun 26 00:01:00 2006 +0000
24
+
25
+ Second
26
+
27
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
28
+Author: A U Thor <author@example.com>
29
+Date: Mon Jun 26 00:00:00 2006 +0000
30
+
31
+ Initial
32
+$
t/t4013/diff.show_--patch-with-raw_side
new
+42
@@ -0,0 +1,42 @@
1
+$ git show --patch-with-raw side
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
+:100644 100644 35d242b... 7289e35... M dir/sub
9
+:100644 100644 01e79c3... f4615da... M file0
10
+:000000 100644 0000000... 7289e35... A file3
11
+
12
+diff --git a/dir/sub b/dir/sub
13
+index 35d242b..7289e35 100644
14
+--- a/dir/sub
15
++++ b/dir/sub
16
+@@ -1,2 +1,4 @@
17
+ A
18
+ B
19
++1
20
++2
21
+diff --git a/file0 b/file0
22
+index 01e79c3..f4615da 100644
23
+--- a/file0
24
++++ b/file0
25
+@@ -1,3 +1,6 @@
26
+ 1
27
+ 2
28
+ 3
29
++A
30
++B
31
++C
32
+diff --git a/file3 b/file3
33
+new file mode 100644
34
+index 0000000..7289e35
35
+--- /dev/null
36
++++ b/file3
37
+@@ -0,0 +1,4 @@
38
++A
39
++B
40
++1
41
++2
42
+$
t/t4013/diff.show_--patch-with-stat_--summary_side
new
+44
@@ -0,0 +1,44 @@
1
+$ git show --patch-with-stat --summary side
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+ create mode 100644 file3
13
+
14
+diff --git a/dir/sub b/dir/sub
15
+index 35d242b..7289e35 100644
16
+--- a/dir/sub
17
++++ b/dir/sub
18
+@@ -1,2 +1,4 @@
19
+ A
20
+ B
21
++1
22
++2
23
+diff --git a/file0 b/file0
24
+index 01e79c3..f4615da 100644
25
+--- a/file0
26
++++ b/file0
27
+@@ -1,3 +1,6 @@
28
+ 1
29
+ 2
30
+ 3
31
++A
32
++B
33
++C
34
+diff --git a/file3 b/file3
35
+new file mode 100644
36
+index 0000000..7289e35
37
+--- /dev/null
38
++++ b/file3
39
+@@ -0,0 +1,4 @@
40
++A
41
++B
42
++1
43
++2
44
+$
t/t4013/diff.show_--patch-with-stat_side
new
+43
@@ -0,0 +1,43 @@
1
+$ git show --patch-with-stat side
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+
13
+diff --git a/dir/sub b/dir/sub
14
+index 35d242b..7289e35 100644
15
+--- a/dir/sub
16
++++ b/dir/sub
17
+@@ -1,2 +1,4 @@
18
+ A
19
+ B
20
++1
21
++2
22
+diff --git a/file0 b/file0
23
+index 01e79c3..f4615da 100644
24
+--- a/file0
25
++++ b/file0
26
+@@ -1,3 +1,6 @@
27
+ 1
28
+ 2
29
+ 3
30
++A
31
++B
32
++C
33
+diff --git a/file3 b/file3
34
+new file mode 100644
35
+index 0000000..7289e35
36
+--- /dev/null
37
++++ b/file3
38
+@@ -0,0 +1,4 @@
39
++A
40
++B
41
++1
42
++2
43
+$
t/t4013/diff.show_--root_initial
new
+34
@@ -0,0 +1,34 @@
1
+$ git show --root initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+
8
+diff --git a/dir/sub b/dir/sub
9
+new file mode 100644
10
+index 0000000..35d242b
11
+--- /dev/null
12
++++ b/dir/sub
13
+@@ -0,0 +1,2 @@
14
++A
15
++B
16
+diff --git a/file0 b/file0
17
+new file mode 100644
18
+index 0000000..01e79c3
19
+--- /dev/null
20
++++ b/file0
21
+@@ -0,0 +1,3 @@
22
++1
23
++2
24
++3
25
+diff --git a/file2 b/file2
26
+new file mode 100644
27
+index 0000000..01e79c3
28
+--- /dev/null
29
++++ b/file2
30
+@@ -0,0 +1,3 @@
31
++1
32
++2
33
++3
34
+$
t/t4013/diff.show_--stat_--summary_side
new
+13
@@ -0,0 +1,13 @@
1
+$ git show --stat --summary side
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+ create mode 100644 file3
13
+$
t/t4013/diff.show_--stat_side
new
+12
@@ -0,0 +1,12 @@
1
+$ git show --stat side
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+$
t/t4013/diff.show_initial
new
+7
@@ -0,0 +1,7 @@
1
+$ git show initial
2
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
3
+Author: A U Thor <author@example.com>
4
+Date: Mon Jun 26 00:00:00 2006 +0000
5
+
6
+ Initial
7
+$
t/t4013/diff.show_master
new
+36
@@ -0,0 +1,36 @@
1
+$ git show 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
+diff --cc dir/sub
10
+index cead32e,7289e35..992913c
11
+--- a/dir/sub
12
++++ b/dir/sub
13
+@@@ -1,6 -1,4 +1,8 @@@
14
+ A
15
+ B
16
+ +C
17
+ +D
18
+ +E
19
+ +F
20
++ 1
21
++ 2
22
+diff --cc file0
23
+index b414108,f4615da..10a8a9f
24
+--- a/file0
25
++++ b/file0
26
+@@@ -1,6 -1,6 +1,9 @@@
27
+ 1
28
+ 2
29
+ 3
30
+ +4
31
+ +5
32
+ +6
33
++ A
34
++ B
35
++ C
36
+$
t/t4013/diff.show_side
new
+38
@@ -0,0 +1,38 @@
1
+$ git show side
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
+diff --git a/dir/sub b/dir/sub
9
+index 35d242b..7289e35 100644
10
+--- a/dir/sub
11
++++ b/dir/sub
12
+@@ -1,2 +1,4 @@
13
+ A
14
+ B
15
++1
16
++2
17
+diff --git a/file0 b/file0
18
+index 01e79c3..f4615da 100644
19
+--- a/file0
20
++++ b/file0
21
+@@ -1,3 +1,6 @@
22
+ 1
23
+ 2
24
+ 3
25
++A
26
++B
27
++C
28
+diff --git a/file3 b/file3
29
+new file mode 100644
30
+index 0000000..7289e35
31
+--- /dev/null
32
++++ b/file3
33
+@@ -0,0 +1,4 @@
34
++A
35
++B
36
++1
37
++2
38
+$
t/t4013/diff.whatchanged_--patch-with-stat_master
new
+114
@@ -0,0 +1,114 @@
1
+$ git whatchanged --patch-with-stat master
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+
13
+diff --git a/dir/sub b/dir/sub
14
+index 35d242b..7289e35 100644
15
+--- a/dir/sub
16
++++ b/dir/sub
17
+@@ -1,2 +1,4 @@
18
+ A
19
+ B
20
++1
21
++2
22
+diff --git a/file0 b/file0
23
+index 01e79c3..f4615da 100644
24
+--- a/file0
25
++++ b/file0
26
+@@ -1,3 +1,6 @@
27
+ 1
28
+ 2
29
+ 3
30
++A
31
++B
32
++C
33
+diff --git a/file3 b/file3
34
+new file mode 100644
35
+index 0000000..7289e35
36
+--- /dev/null
37
++++ b/file3
38
+@@ -0,0 +1,4 @@
39
++A
40
++B
41
++1
42
++2
43
+
44
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
45
+Author: A U Thor <author@example.com>
46
+Date: Mon Jun 26 00:02:00 2006 +0000
47
+
48
+ Third
49
+---
50
+ dir/sub | 2 ++
51
+ file1 | 3 +++
52
+ 2 files changed, 5 insertions(+), 0 deletions(-)
53
+
54
+diff --git a/dir/sub b/dir/sub
55
+index 8422d40..cead32e 100644
56
+--- a/dir/sub
57
++++ b/dir/sub
58
+@@ -2,3 +2,5 @@ A
59
+ B
60
+ C
61
+ D
62
++E
63
++F
64
+diff --git a/file1 b/file1
65
+new file mode 100644
66
+index 0000000..b1e6722
67
+--- /dev/null
68
++++ b/file1
69
+@@ -0,0 +1,3 @@
70
++A
71
++B
72
++C
73
+
74
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
75
+Author: A U Thor <author@example.com>
76
+Date: Mon Jun 26 00:01:00 2006 +0000
77
+
78
+ Second
79
+---
80
+ dir/sub | 2 ++
81
+ file0 | 3 +++
82
+ file2 | 3 ---
83
+ 3 files changed, 5 insertions(+), 3 deletions(-)
84
+
85
+diff --git a/dir/sub b/dir/sub
86
+index 35d242b..8422d40 100644
87
+--- a/dir/sub
88
++++ b/dir/sub
89
+@@ -1,2 +1,4 @@
90
+ A
91
+ B
92
++C
93
++D
94
+diff --git a/file0 b/file0
95
+index 01e79c3..b414108 100644
96
+--- a/file0
97
++++ b/file0
98
+@@ -1,3 +1,6 @@
99
+ 1
100
+ 2
101
+ 3
102
++4
103
++5
104
++6
105
+diff --git a/file2 b/file2
106
+deleted file mode 100644
107
+index 01e79c3..0000000
108
+--- a/file2
109
++++ /dev/null
110
+@@ -1,3 +0,0 @@
111
+-1
112
+-2
113
+-3
114
+$
t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_
new
+59
@@ -0,0 +1,59 @@
1
+$ git whatchanged --patch-with-stat 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_--patch-with-stat_--summary_master
new
+158
@@ -0,0 +1,158 @@
1
+$ git whatchanged --root --patch-with-stat --summary master
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+ create mode 100644 file3
13
+
14
+diff --git a/dir/sub b/dir/sub
15
+index 35d242b..7289e35 100644
16
+--- a/dir/sub
17
++++ b/dir/sub
18
+@@ -1,2 +1,4 @@
19
+ A
20
+ B
21
++1
22
++2
23
+diff --git a/file0 b/file0
24
+index 01e79c3..f4615da 100644
25
+--- a/file0
26
++++ b/file0
27
+@@ -1,3 +1,6 @@
28
+ 1
29
+ 2
30
+ 3
31
++A
32
++B
33
++C
34
+diff --git a/file3 b/file3
35
+new file mode 100644
36
+index 0000000..7289e35
37
+--- /dev/null
38
++++ b/file3
39
+@@ -0,0 +1,4 @@
40
++A
41
++B
42
++1
43
++2
44
+
45
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
46
+Author: A U Thor <author@example.com>
47
+Date: Mon Jun 26 00:02:00 2006 +0000
48
+
49
+ Third
50
+---
51
+ dir/sub | 2 ++
52
+ file1 | 3 +++
53
+ 2 files changed, 5 insertions(+), 0 deletions(-)
54
+ create mode 100644 file1
55
+
56
+diff --git a/dir/sub b/dir/sub
57
+index 8422d40..cead32e 100644
58
+--- a/dir/sub
59
++++ b/dir/sub
60
+@@ -2,3 +2,5 @@ A
61
+ B
62
+ C
63
+ D
64
++E
65
++F
66
+diff --git a/file1 b/file1
67
+new file mode 100644
68
+index 0000000..b1e6722
69
+--- /dev/null
70
++++ b/file1
71
+@@ -0,0 +1,3 @@
72
++A
73
++B
74
++C
75
+
76
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
77
+Author: A U Thor <author@example.com>
78
+Date: Mon Jun 26 00:01:00 2006 +0000
79
+
80
+ Second
81
+---
82
+ dir/sub | 2 ++
83
+ file0 | 3 +++
84
+ file2 | 3 ---
85
+ 3 files changed, 5 insertions(+), 3 deletions(-)
86
+ delete mode 100644 file2
87
+
88
+diff --git a/dir/sub b/dir/sub
89
+index 35d242b..8422d40 100644
90
+--- a/dir/sub
91
++++ b/dir/sub
92
+@@ -1,2 +1,4 @@
93
+ A
94
+ B
95
++C
96
++D
97
+diff --git a/file0 b/file0
98
+index 01e79c3..b414108 100644
99
+--- a/file0
100
++++ b/file0
101
+@@ -1,3 +1,6 @@
102
+ 1
103
+ 2
104
+ 3
105
++4
106
++5
107
++6
108
+diff --git a/file2 b/file2
109
+deleted file mode 100644
110
+index 01e79c3..0000000
111
+--- a/file2
112
++++ /dev/null
113
+@@ -1,3 +0,0 @@
114
+-1
115
+-2
116
+-3
117
+
118
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
119
+Author: A U Thor <author@example.com>
120
+Date: Mon Jun 26 00:00:00 2006 +0000
121
+
122
+ Initial
123
+---
124
+ dir/sub | 2 ++
125
+ file0 | 3 +++
126
+ file2 | 3 +++
127
+ 3 files changed, 8 insertions(+), 0 deletions(-)
128
+ create mode 100644 dir/sub
129
+ create mode 100644 file0
130
+ create mode 100644 file2
131
+
132
+diff --git a/dir/sub b/dir/sub
133
+new file mode 100644
134
+index 0000000..35d242b
135
+--- /dev/null
136
++++ b/dir/sub
137
+@@ -0,0 +1,2 @@
138
++A
139
++B
140
+diff --git a/file0 b/file0
141
+new file mode 100644
142
+index 0000000..01e79c3
143
+--- /dev/null
144
++++ b/file0
145
+@@ -0,0 +1,3 @@
146
++1
147
++2
148
++3
149
+diff --git a/file2 b/file2
150
+new file mode 100644
151
+index 0000000..01e79c3
152
+--- /dev/null
153
++++ b/file2
154
+@@ -0,0 +1,3 @@
155
++1
156
++2
157
++3
158
+$
t/t4013/diff.whatchanged_--root_--patch-with-stat_master
new
+152
@@ -0,0 +1,152 @@
1
+$ git whatchanged --root --patch-with-stat master
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
+ file0 | 3 +++
10
+ file3 | 4 ++++
11
+ 3 files changed, 9 insertions(+), 0 deletions(-)
12
+
13
+diff --git a/dir/sub b/dir/sub
14
+index 35d242b..7289e35 100644
15
+--- a/dir/sub
16
++++ b/dir/sub
17
+@@ -1,2 +1,4 @@
18
+ A
19
+ B
20
++1
21
++2
22
+diff --git a/file0 b/file0
23
+index 01e79c3..f4615da 100644
24
+--- a/file0
25
++++ b/file0
26
+@@ -1,3 +1,6 @@
27
+ 1
28
+ 2
29
+ 3
30
++A
31
++B
32
++C
33
+diff --git a/file3 b/file3
34
+new file mode 100644
35
+index 0000000..7289e35
36
+--- /dev/null
37
++++ b/file3
38
+@@ -0,0 +1,4 @@
39
++A
40
++B
41
++1
42
++2
43
+
44
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
45
+Author: A U Thor <author@example.com>
46
+Date: Mon Jun 26 00:02:00 2006 +0000
47
+
48
+ Third
49
+---
50
+ dir/sub | 2 ++
51
+ file1 | 3 +++
52
+ 2 files changed, 5 insertions(+), 0 deletions(-)
53
+
54
+diff --git a/dir/sub b/dir/sub
55
+index 8422d40..cead32e 100644
56
+--- a/dir/sub
57
++++ b/dir/sub
58
+@@ -2,3 +2,5 @@ A
59
+ B
60
+ C
61
+ D
62
++E
63
++F
64
+diff --git a/file1 b/file1
65
+new file mode 100644
66
+index 0000000..b1e6722
67
+--- /dev/null
68
++++ b/file1
69
+@@ -0,0 +1,3 @@
70
++A
71
++B
72
++C
73
+
74
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
75
+Author: A U Thor <author@example.com>
76
+Date: Mon Jun 26 00:01:00 2006 +0000
77
+
78
+ Second
79
+---
80
+ dir/sub | 2 ++
81
+ file0 | 3 +++
82
+ file2 | 3 ---
83
+ 3 files changed, 5 insertions(+), 3 deletions(-)
84
+
85
+diff --git a/dir/sub b/dir/sub
86
+index 35d242b..8422d40 100644
87
+--- a/dir/sub
88
++++ b/dir/sub
89
+@@ -1,2 +1,4 @@
90
+ A
91
+ B
92
++C
93
++D
94
+diff --git a/file0 b/file0
95
+index 01e79c3..b414108 100644
96
+--- a/file0
97
++++ b/file0
98
+@@ -1,3 +1,6 @@
99
+ 1
100
+ 2
101
+ 3
102
++4
103
++5
104
++6
105
+diff --git a/file2 b/file2
106
+deleted file mode 100644
107
+index 01e79c3..0000000
108
+--- a/file2
109
++++ /dev/null
110
+@@ -1,3 +0,0 @@
111
+-1
112
+-2
113
+-3
114
+
115
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
116
+Author: A U Thor <author@example.com>
117
+Date: Mon Jun 26 00:00:00 2006 +0000
118
+
119
+ Initial
120
+---
121
+ dir/sub | 2 ++
122
+ file0 | 3 +++
123
+ file2 | 3 +++
124
+ 3 files changed, 8 insertions(+), 0 deletions(-)
125
+
126
+diff --git a/dir/sub b/dir/sub
127
+new file mode 100644
128
+index 0000000..35d242b
129
+--- /dev/null
130
++++ b/dir/sub
131
+@@ -0,0 +1,2 @@
132
++A
133
++B
134
+diff --git a/file0 b/file0
135
+new file mode 100644
136
+index 0000000..01e79c3
137
+--- /dev/null
138
++++ b/file0
139
+@@ -0,0 +1,3 @@
140
++1
141
++2
142
++3
143
+diff --git a/file2 b/file2
144
+new file mode 100644
145
+index 0000000..01e79c3
146
+--- /dev/null
147
++++ b/file2
148
+@@ -0,0 +1,3 @@
149
++1
150
++2
151
++3
152
+$
t/t4013/diff.whatchanged_--root_-p_master
new
+133
@@ -0,0 +1,133 @@
1
+$ git whatchanged --root -p master
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
+diff --git a/dir/sub b/dir/sub
9
+index 35d242b..7289e35 100644
10
+--- a/dir/sub
11
++++ b/dir/sub
12
+@@ -1,2 +1,4 @@
13
+ A
14
+ B
15
++1
16
++2
17
+diff --git a/file0 b/file0
18
+index 01e79c3..f4615da 100644
19
+--- a/file0
20
++++ b/file0
21
+@@ -1,3 +1,6 @@
22
+ 1
23
+ 2
24
+ 3
25
++A
26
++B
27
++C
28
+diff --git a/file3 b/file3
29
+new file mode 100644
30
+index 0000000..7289e35
31
+--- /dev/null
32
++++ b/file3
33
+@@ -0,0 +1,4 @@
34
++A
35
++B
36
++1
37
++2
38
+
39
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
40
+Author: A U Thor <author@example.com>
41
+Date: Mon Jun 26 00:02:00 2006 +0000
42
+
43
+ Third
44
+
45
+diff --git a/dir/sub b/dir/sub
46
+index 8422d40..cead32e 100644
47
+--- a/dir/sub
48
++++ b/dir/sub
49
+@@ -2,3 +2,5 @@ A
50
+ B
51
+ C
52
+ D
53
++E
54
++F
55
+diff --git a/file1 b/file1
56
+new file mode 100644
57
+index 0000000..b1e6722
58
+--- /dev/null
59
++++ b/file1
60
+@@ -0,0 +1,3 @@
61
++A
62
++B
63
++C
64
+
65
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
66
+Author: A U Thor <author@example.com>
67
+Date: Mon Jun 26 00:01:00 2006 +0000
68
+
69
+ Second
70
+
71
+diff --git a/dir/sub b/dir/sub
72
+index 35d242b..8422d40 100644
73
+--- a/dir/sub
74
++++ b/dir/sub
75
+@@ -1,2 +1,4 @@
76
+ A
77
+ B
78
++C
79
++D
80
+diff --git a/file0 b/file0
81
+index 01e79c3..b414108 100644
82
+--- a/file0
83
++++ b/file0
84
+@@ -1,3 +1,6 @@
85
+ 1
86
+ 2
87
+ 3
88
++4
89
++5
90
++6
91
+diff --git a/file2 b/file2
92
+deleted file mode 100644
93
+index 01e79c3..0000000
94
+--- a/file2
95
++++ /dev/null
96
+@@ -1,3 +0,0 @@
97
+-1
98
+-2
99
+-3
100
+
101
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
102
+Author: A U Thor <author@example.com>
103
+Date: Mon Jun 26 00:00:00 2006 +0000
104
+
105
+ Initial
106
+
107
+diff --git a/dir/sub b/dir/sub
108
+new file mode 100644
109
+index 0000000..35d242b
110
+--- /dev/null
111
++++ b/dir/sub
112
+@@ -0,0 +1,2 @@
113
++A
114
++B
115
+diff --git a/file0 b/file0
116
+new file mode 100644
117
+index 0000000..01e79c3
118
+--- /dev/null
119
++++ b/file0
120
+@@ -0,0 +1,3 @@
121
++1
122
++2
123
++3
124
+diff --git a/file2 b/file2
125
+new file mode 100644
126
+index 0000000..01e79c3
127
+--- /dev/null
128
++++ b/file2
129
+@@ -0,0 +1,3 @@
130
++1
131
++2
132
++3
133
+$
t/t4013/diff.whatchanged_--root_master
new
+40
@@ -0,0 +1,40 @@
1
+$ git whatchanged --root master
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
+:100644 100644 35d242b... 7289e35... M dir/sub
9
+:100644 100644 01e79c3... f4615da... M file0
10
+:000000 100644 0000000... 7289e35... A file3
11
+
12
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
13
+Author: A U Thor <author@example.com>
14
+Date: Mon Jun 26 00:02:00 2006 +0000
15
+
16
+ Third
17
+
18
+:100644 100644 8422d40... cead32e... M dir/sub
19
+:000000 100644 0000000... b1e6722... A file1
20
+
21
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
22
+Author: A U Thor <author@example.com>
23
+Date: Mon Jun 26 00:01:00 2006 +0000
24
+
25
+ Second
26
+
27
+:100644 100644 35d242b... 8422d40... M dir/sub
28
+:100644 100644 01e79c3... b414108... M file0
29
+:100644 000000 01e79c3... 0000000... D file2
30
+
31
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
32
+Author: A U Thor <author@example.com>
33
+Date: Mon Jun 26 00:00:00 2006 +0000
34
+
35
+ Initial
36
+
37
+:000000 100644 0000000... 35d242b... A dir/sub
38
+:000000 100644 0000000... 01e79c3... A file0
39
+:000000 100644 0000000... 01e79c3... A file2
40
+$
t/t4013/diff.whatchanged_-SF_master
new
+9
@@ -0,0 +1,9 @@
1
+$ git whatchanged -SF 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
+:100644 100644 8422d40... cead32e... M dir/sub
9
+$
t/t4013/diff.whatchanged_-p_master
new
+100
@@ -0,0 +1,100 @@
1
+$ git whatchanged -p master
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
+diff --git a/dir/sub b/dir/sub
9
+index 35d242b..7289e35 100644
10
+--- a/dir/sub
11
++++ b/dir/sub
12
+@@ -1,2 +1,4 @@
13
+ A
14
+ B
15
++1
16
++2
17
+diff --git a/file0 b/file0
18
+index 01e79c3..f4615da 100644
19
+--- a/file0
20
++++ b/file0
21
+@@ -1,3 +1,6 @@
22
+ 1
23
+ 2
24
+ 3
25
++A
26
++B
27
++C
28
+diff --git a/file3 b/file3
29
+new file mode 100644
30
+index 0000000..7289e35
31
+--- /dev/null
32
++++ b/file3
33
+@@ -0,0 +1,4 @@
34
++A
35
++B
36
++1
37
++2
38
+
39
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
40
+Author: A U Thor <author@example.com>
41
+Date: Mon Jun 26 00:02:00 2006 +0000
42
+
43
+ Third
44
+
45
+diff --git a/dir/sub b/dir/sub
46
+index 8422d40..cead32e 100644
47
+--- a/dir/sub
48
++++ b/dir/sub
49
+@@ -2,3 +2,5 @@ A
50
+ B
51
+ C
52
+ D
53
++E
54
++F
55
+diff --git a/file1 b/file1
56
+new file mode 100644
57
+index 0000000..b1e6722
58
+--- /dev/null
59
++++ b/file1
60
+@@ -0,0 +1,3 @@
61
++A
62
++B
63
++C
64
+
65
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
66
+Author: A U Thor <author@example.com>
67
+Date: Mon Jun 26 00:01:00 2006 +0000
68
+
69
+ Second
70
+
71
+diff --git a/dir/sub b/dir/sub
72
+index 35d242b..8422d40 100644
73
+--- a/dir/sub
74
++++ b/dir/sub
75
+@@ -1,2 +1,4 @@
76
+ A
77
+ B
78
++C
79
++D
80
+diff --git a/file0 b/file0
81
+index 01e79c3..b414108 100644
82
+--- a/file0
83
++++ b/file0
84
+@@ -1,3 +1,6 @@
85
+ 1
86
+ 2
87
+ 3
88
++4
89
++5
90
++6
91
+diff --git a/file2 b/file2
92
+deleted file mode 100644
93
+index 01e79c3..0000000
94
+--- a/file2
95
++++ /dev/null
96
+@@ -1,3 +0,0 @@
97
+-1
98
+-2
99
+-3
100
+$
t/t4013/diff.whatchanged_master
new
+30
@@ -0,0 +1,30 @@
1
+$ git whatchanged master
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
+:100644 100644 35d242b... 7289e35... M dir/sub
9
+:100644 100644 01e79c3... f4615da... M file0
10
+:000000 100644 0000000... 7289e35... A file3
11
+
12
+commit 889b315013ef9f2e2f90aa0b054b267c8a557847
13
+Author: A U Thor <author@example.com>
14
+Date: Mon Jun 26 00:02:00 2006 +0000
15
+
16
+ Third
17
+
18
+:100644 100644 8422d40... cead32e... M dir/sub
19
+:000000 100644 0000000... b1e6722... A file1
20
+
21
+commit 7952a93e09bf565b5592766a438b40cd81f4846f
22
+Author: A U Thor <author@example.com>
23
+Date: Mon Jun 26 00:01:00 2006 +0000
24
+
25
+ Second
26
+
27
+:100644 100644 35d242b... 8422d40... M dir/sub
28
+:100644 100644 01e79c3... b414108... M file0
29
+:100644 000000 01e79c3... 0000000... D file2
30
+$