Add --summary to git-format-patch by default
This adds --summary output in addition to the --stat to the output from git-format-patch by default. I think additions, removals and filemode changes are rare but notable events and always showing it makes sense. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 17, 2007 at 13:51 UTC
c261e4385e826a4e7f9cf69618fa0b6e39defad2
7 files changed
+13
-1
builtin-log.c
+1
-1
@@ -468,7 +468,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
468
die ("unrecognized argument: %s", argv[1]);
469
470
if (!rev.diffopt.output_format)
471
- rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
471
+ rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_SUMMARY | DIFF_FORMAT_PATCH;
472
473
if (!output_directory)
474
output_directory = prefix;
t/t4013/diff.format-patch_--attach_--stdout_initial..master
+3
@@ -19,6 +19,7 @@ This is the second commit.
19
file0 | 3 +++
20
file2 | 3 ---
21
3 files changed, 5 insertions(+), 3 deletions(-)
22
+ delete mode 100644 file2
23
--------------g-i-t--v-e-r-s-i-o-n
24
Content-Type: text/x-patch;
25
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
@@ -77,6 +78,7 @@ Content-Transfer-Encoding: 8bit
78
dir/sub | 2 ++
79
file1 | 3 +++
80
2 files changed, 5 insertions(+), 0 deletions(-)
81
+ create mode 100644 file1
82
--------------g-i-t--v-e-r-s-i-o-n
83
Content-Type: text/x-patch;
84
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
@@ -126,6 +128,7 @@ Content-Transfer-Encoding: 8bit
128
file0 | 3 +++
129
file3 | 4 ++++
130
3 files changed, 9 insertions(+), 0 deletions(-)
131
+ create mode 100644 file3
132
--------------g-i-t--v-e-r-s-i-o-n
133
Content-Type: text/x-patch;
134
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
t/t4013/diff.format-patch_--attach_--stdout_initial..master^
+2
@@ -19,6 +19,7 @@ This is the second commit.
19
file0 | 3 +++
20
file2 | 3 ---
21
3 files changed, 5 insertions(+), 3 deletions(-)
22
+ delete mode 100644 file2
23
--------------g-i-t--v-e-r-s-i-o-n
24
Content-Type: text/x-patch;
25
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
@@ -77,6 +78,7 @@ Content-Transfer-Encoding: 8bit
78
dir/sub | 2 ++
79
file1 | 3 +++
80
2 files changed, 5 insertions(+), 0 deletions(-)
81
+ create mode 100644 file1
82
--------------g-i-t--v-e-r-s-i-o-n
83
Content-Type: text/x-patch;
84
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
t/t4013/diff.format-patch_--attach_--stdout_initial..side
+1
@@ -17,6 +17,7 @@ Content-Transfer-Encoding: 8bit
17
file0 | 3 +++
18
file3 | 4 ++++
19
3 files changed, 9 insertions(+), 0 deletions(-)
20
+ create mode 100644 file3
21
--------------g-i-t--v-e-r-s-i-o-n
22
Content-Type: text/x-patch;
23
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
t/t4013/diff.format-patch_--stdout_initial..master
+3
@@ -10,6 +10,7 @@ This is the second commit.
10
file0 | 3 +++
11
file2 | 3 ---
12
3 files changed, 5 insertions(+), 3 deletions(-)
13
+ delete mode 100644 file2
14
15
diff --git a/dir/sub b/dir/sub
16
index 35d242b..8422d40 100644
@@ -53,6 +54,7 @@ Subject: [PATCH] Third
54
dir/sub | 2 ++
55
file1 | 3 +++
56
2 files changed, 5 insertions(+), 0 deletions(-)
57
+ create mode 100644 file1
58
59
diff --git a/dir/sub b/dir/sub
60
index 8422d40..cead32e 100644
@@ -87,6 +89,7 @@ Subject: [PATCH] Side
89
file0 | 3 +++
90
file3 | 4 ++++
91
3 files changed, 9 insertions(+), 0 deletions(-)
92
+ create mode 100644 file3
93
94
diff --git a/dir/sub b/dir/sub
95
index 35d242b..7289e35 100644
t/t4013/diff.format-patch_--stdout_initial..master^
+2
@@ -10,6 +10,7 @@ This is the second commit.
10
file0 | 3 +++
11
file2 | 3 ---
12
3 files changed, 5 insertions(+), 3 deletions(-)
13
+ delete mode 100644 file2
14
15
diff --git a/dir/sub b/dir/sub
16
index 35d242b..8422d40 100644
@@ -53,6 +54,7 @@ Subject: [PATCH] Third
54
dir/sub | 2 ++
55
file1 | 3 +++
56
2 files changed, 5 insertions(+), 0 deletions(-)
57
+ create mode 100644 file1
58
59
diff --git a/dir/sub b/dir/sub
60
index 8422d40..cead32e 100644
t/t4013/diff.format-patch_--stdout_initial..side
+1
@@ -9,6 +9,7 @@ Subject: [PATCH] Side
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