Skip to content

Commit 298889d

Browse files
sorganovgitster
authored andcommitted
t/t4013: add test for --diff-merges=off
Signed-off-by: Sergey Organov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 405a2fd commit 298889d

File tree

3 files changed

+158
-0
lines changed

3 files changed

+158
-0
lines changed

t/t4013-diff-various.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ log --root -c --patch-with-stat --summary master
298298
# improved by Timo's patch
299299
log --root --cc --patch-with-stat --summary master
300300
log --no-diff-merges -p --first-parent master
301+
log --diff-merges=off -p --first-parent master
302+
log --first-parent --diff-merges=off -p master
301303
log -p --first-parent master
302304
log -m -p --first-parent master
303305
log -m -p master
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
$ git log --diff-merges=off -p --first-parent master
2+
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
3+
Merge: 9a6d494 c7a2ab9
4+
Author: A U Thor <[email protected]>
5+
Date: Mon Jun 26 00:04:00 2006 +0000
6+
7+
Merge branch 'side' into master
8+
9+
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
10+
Author: A U Thor <[email protected]>
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 <[email protected]>
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 <[email protected]>
75+
Date: Mon Jun 26 00:00:00 2006 +0000
76+
77+
Initial
78+
$
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
$ git log --first-parent --diff-merges=off -p master
2+
commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f
3+
Merge: 9a6d494 c7a2ab9
4+
Author: A U Thor <[email protected]>
5+
Date: Mon Jun 26 00:04:00 2006 +0000
6+
7+
Merge branch 'side' into master
8+
9+
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
10+
Author: A U Thor <[email protected]>
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 <[email protected]>
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 <[email protected]>
75+
Date: Mon Jun 26 00:00:00 2006 +0000
76+
77+
Initial
78+
$

0 commit comments

Comments
 (0)