t4013: add tests for log -p -m --first-parent
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Mar 8, 2010 at 21:11 UTC
126f431ab61b250deab2b46f933a5bcd35a71c6b
4 files changed
+381
t/t4013-diff-various.sh
+3
@@ -204,6 +204,9 @@ log --root --patch-with-stat --summary master
204
log --root -c --patch-with-stat --summary master
205
# improved by Timo's patch
206
log --root --cc --patch-with-stat --summary master
207
+log -p --first-parent master
208
+log -m -p --first-parent master
209
+log -m -p master
210
log -SF master
211
log -SF -p master
212
log --decorate --all
t/t4013/diff.log_-m_-p_--first-parent_master
new
+100
@@ -0,0 +1,100 @@
1
+$ git log -m -p --first-parent master
2
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
3
+Merge: 9a6d494 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 --git a/dir/sub b/dir/sub
10
+index cead32e..992913c 100644
11
+--- a/dir/sub
12
++++ b/dir/sub
13
+@@ -4,3 +4,5 @@ C
14
+ D
15
+ E
16
+ F
17
++1
18
++2
19
+diff --git a/file0 b/file0
20
+index b414108..10a8a9f 100644
21
+--- a/file0
22
++++ b/file0
23
+@@ -4,3 +4,6 @@
24
+ 4
25
+ 5
26
+ 6
27
++A
28
++B
29
++C
30
+
31
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
32
+Author: A U Thor <author@example.com>
33
+Date: Mon Jun 26 00:02:00 2006 +0000
34
+
35
+ Third
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
+diff --git a/file1 b/file1
48
+new file mode 100644
49
+index 0000000..b1e6722
50
+--- /dev/null
51
++++ b/file1
52
+@@ -0,0 +1,3 @@
53
++A
54
++B
55
++C
56
+
57
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
58
+Author: A U Thor <author@example.com>
59
+Date: Mon Jun 26 00:01:00 2006 +0000
60
+
61
+ Second
62
+
63
+ This is the second commit.
64
+
65
+diff --git a/dir/sub b/dir/sub
66
+index 35d242b..8422d40 100644
67
+--- a/dir/sub
68
++++ b/dir/sub
69
+@@ -1,2 +1,4 @@
70
+ A
71
+ B
72
++C
73
++D
74
+diff --git a/file0 b/file0
75
+index 01e79c3..b414108 100644
76
+--- a/file0
77
++++ b/file0
78
+@@ -1,3 +1,6 @@
79
+ 1
80
+ 2
81
+ 3
82
++4
83
++5
84
++6
85
+diff --git a/file2 b/file2
86
+deleted file mode 100644
87
+index 01e79c3..0000000
88
+--- a/file2
89
++++ /dev/null
90
+@@ -1,3 +0,0 @@
91
+-1
92
+-2
93
+-3
94
+
95
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
96
+Author: A U Thor <author@example.com>
97
+Date: Mon Jun 26 00:00:00 2006 +0000
98
+
99
+ Initial
100
+$
t/t4013/diff.log_-m_-p_master
new
+200
@@ -0,0 +1,200 @@
1
+$ git log -m -p master
2
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)
3
+Merge: 9a6d494 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 --git a/dir/sub b/dir/sub
10
+index cead32e..992913c 100644
11
+--- a/dir/sub
12
++++ b/dir/sub
13
+@@ -4,3 +4,5 @@ C
14
+ D
15
+ E
16
+ F
17
++1
18
++2
19
+diff --git a/file0 b/file0
20
+index b414108..10a8a9f 100644
21
+--- a/file0
22
++++ b/file0
23
+@@ -4,3 +4,6 @@
24
+ 4
25
+ 5
26
+ 6
27
++A
28
++B
29
++C
30
+
31
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a)
32
+Merge: 9a6d494 c7a2ab9
33
+Author: A U Thor <author@example.com>
34
+Date: Mon Jun 26 00:04:00 2006 +0000
35
+
36
+ Merge branch 'side'
37
+
38
+diff --git a/dir/sub b/dir/sub
39
+index 7289e35..992913c 100644
40
+--- a/dir/sub
41
++++ b/dir/sub
42
+@@ -1,4 +1,8 @@
43
+ A
44
+ B
45
++C
46
++D
47
++E
48
++F
49
+ 1
50
+ 2
51
+diff --git a/file0 b/file0
52
+index f4615da..10a8a9f 100644
53
+--- a/file0
54
++++ b/file0
55
+@@ -1,6 +1,9 @@
56
+ 1
57
+ 2
58
+ 3
59
++4
60
++5
61
++6
62
+ A
63
+ B
64
+ C
65
+diff --git a/file1 b/file1
66
+new file mode 100644
67
+index 0000000..b1e6722
68
+--- /dev/null
69
++++ b/file1
70
+@@ -0,0 +1,3 @@
71
++A
72
++B
73
++C
74
+diff --git a/file2 b/file2
75
+deleted file mode 100644
76
+index 01e79c3..0000000
77
+--- a/file2
78
++++ /dev/null
79
+@@ -1,3 +0,0 @@
80
+-1
81
+-2
82
+-3
83
+diff --git a/file3 b/file3
84
+deleted file mode 100644
85
+index 7289e35..0000000
86
+--- a/file3
87
++++ /dev/null
88
+@@ -1,4 +0,0 @@
89
+-A
90
+-B
91
+-1
92
+-2
93
+
94
+commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
95
+Author: A U Thor <author@example.com>
96
+Date: Mon Jun 26 00:03:00 2006 +0000
97
+
98
+ Side
99
+
100
+diff --git a/dir/sub b/dir/sub
101
+index 35d242b..7289e35 100644
102
+--- a/dir/sub
103
++++ b/dir/sub
104
+@@ -1,2 +1,4 @@
105
+ A
106
+ B
107
++1
108
++2
109
+diff --git a/file0 b/file0
110
+index 01e79c3..f4615da 100644
111
+--- a/file0
112
++++ b/file0
113
+@@ -1,3 +1,6 @@
114
+ 1
115
+ 2
116
+ 3
117
++A
118
++B
119
++C
120
+diff --git a/file3 b/file3
121
+new file mode 100644
122
+index 0000000..7289e35
123
+--- /dev/null
124
++++ b/file3
125
+@@ -0,0 +1,4 @@
126
++A
127
++B
128
++1
129
++2
130
+
131
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
132
+Author: A U Thor <author@example.com>
133
+Date: Mon Jun 26 00:02:00 2006 +0000
134
+
135
+ Third
136
+
137
+diff --git a/dir/sub b/dir/sub
138
+index 8422d40..cead32e 100644
139
+--- a/dir/sub
140
++++ b/dir/sub
141
+@@ -2,3 +2,5 @@ A
142
+ B
143
+ C
144
+ D
145
++E
146
++F
147
+diff --git a/file1 b/file1
148
+new file mode 100644
149
+index 0000000..b1e6722
150
+--- /dev/null
151
++++ b/file1
152
+@@ -0,0 +1,3 @@
153
++A
154
++B
155
++C
156
+
157
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
158
+Author: A U Thor <author@example.com>
159
+Date: Mon Jun 26 00:01:00 2006 +0000
160
+
161
+ Second
162
+
163
+ This is the second commit.
164
+
165
+diff --git a/dir/sub b/dir/sub
166
+index 35d242b..8422d40 100644
167
+--- a/dir/sub
168
++++ b/dir/sub
169
+@@ -1,2 +1,4 @@
170
+ A
171
+ B
172
++C
173
++D
174
+diff --git a/file0 b/file0
175
+index 01e79c3..b414108 100644
176
+--- a/file0
177
++++ b/file0
178
+@@ -1,3 +1,6 @@
179
+ 1
180
+ 2
181
+ 3
182
++4
183
++5
184
++6
185
+diff --git a/file2 b/file2
186
+deleted file mode 100644
187
+index 01e79c3..0000000
188
+--- a/file2
189
++++ /dev/null
190
+@@ -1,3 +0,0 @@
191
+-1
192
+-2
193
+-3
194
+
195
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
196
+Author: A U Thor <author@example.com>
197
+Date: Mon Jun 26 00:00:00 2006 +0000
198
+
199
+ Initial
200
+$
t/t4013/diff.log_-p_--first-parent_master
new
+78
@@ -0,0 +1,78 @@
1
+$ git log -p --first-parent master
2
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
3
+Merge: 9a6d494 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 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
10
+Author: A U Thor <author@example.com>
11
+Date: Mon Jun 26 00:02:00 2006 +0000
12
+
13
+ Third
14
+
15
+diff --git a/dir/sub b/dir/sub
16
+index 8422d40..cead32e 100644
17
+--- a/dir/sub
18
++++ b/dir/sub
19
+@@ -2,3 +2,5 @@ A
20
+ B
21
+ C
22
+ D
23
++E
24
++F
25
+diff --git a/file1 b/file1
26
+new file mode 100644
27
+index 0000000..b1e6722
28
+--- /dev/null
29
++++ b/file1
30
+@@ -0,0 +1,3 @@
31
++A
32
++B
33
++C
34
+
35
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
36
+Author: A U Thor <author@example.com>
37
+Date: Mon Jun 26 00:01:00 2006 +0000
38
+
39
+ Second
40
+
41
+ This is the second commit.
42
+
43
+diff --git a/dir/sub b/dir/sub
44
+index 35d242b..8422d40 100644
45
+--- a/dir/sub
46
++++ b/dir/sub
47
+@@ -1,2 +1,4 @@
48
+ A
49
+ B
50
++C
51
++D
52
+diff --git a/file0 b/file0
53
+index 01e79c3..b414108 100644
54
+--- a/file0
55
++++ b/file0
56
+@@ -1,3 +1,6 @@
57
+ 1
58
+ 2
59
+ 3
60
++4
61
++5
62
++6
63
+diff --git a/file2 b/file2
64
+deleted file mode 100644
65
+index 01e79c3..0000000
66
+--- a/file2
67
++++ /dev/null
68
+@@ -1,3 +0,0 @@
69
+-1
70
+-2
71
+-3
72
+
73
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
74
+Author: A U Thor <author@example.com>
75
+Date: Mon Jun 26 00:00:00 2006 +0000
76
+
77
+ Initial
78
+$