From 47979d5d5bb86d058dce77801648734abe1e593b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 26 Jun 2006 23:29:11 -0700 Subject: [PATCH] t4013: add more tests around -c and --cc Signed-off-by: Junio C Hamano --- t/t4013-diff-various.sh | 28 ++- ...ee_--cc_--patch-with-stat_--summary_master | 35 ++++ ...tree_--cc_--patch-with-stat_--summary_side | 39 ++++ ...iff.diff-tree_--cc_--stat_--summary_master | 6 + .../diff.diff-tree_--cc_--stat_--summary_side | 8 + t/t4013/diff.diff-tree_--cc_--stat_master | 6 + .../diff.diff-tree_-c_--stat_--summary_master | 6 + .../diff.diff-tree_-c_--stat_--summary_side | 8 + t/t4013/diff.diff-tree_-c_--stat_master | 6 + ...--patch-with-stat_--summary_master_--_dir_ | 72 +++++++ ...ot_--cc_--patch-with-stat_--summary_master | 198 ++++++++++++++++++ ..._--root_--patch-with-stat_--summary_master | 165 +++++++++++++++ ...root_-c_--patch-with-stat_--summary_master | 198 ++++++++++++++++++ t/t4013/diff.log_-SF_-p_master | 18 ++ ...--patch-with-stat_--summary_master_--_dir_ | 59 ++++++ ...ot_--cc_--patch-with-stat_--summary_master | 198 ++++++++++++++++++ ...root_-c_--patch-with-stat_--summary_master | 198 ++++++++++++++++++ t/t4013/diff.whatchanged_-SF_-p_master | 18 ++ 18 files changed, 1263 insertions(+), 3 deletions(-) create mode 100644 t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side create mode 100644 t/t4013/diff.diff-tree_--cc_--stat_--summary_master create mode 100644 t/t4013/diff.diff-tree_--cc_--stat_--summary_side create mode 100644 t/t4013/diff.diff-tree_--cc_--stat_master create mode 100644 t/t4013/diff.diff-tree_-c_--stat_--summary_master create mode 100644 t/t4013/diff.diff-tree_-c_--stat_--summary_side create mode 100644 t/t4013/diff.diff-tree_-c_--stat_master create mode 100644 t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ create mode 100644 t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.log_--root_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.log_-SF_-p_master create mode 100644 t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ create mode 100644 t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master create mode 100644 t/t4013/diff.whatchanged_-SF_-p_master diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 802e0ba01..22984e3db 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -163,6 +163,22 @@ diff-tree -p -m master diff-tree -c master diff-tree -c --abbrev master diff-tree --cc master +# stat only should show the diffstat with the first parent +diff-tree -c --stat master +diff-tree --cc --stat master +diff-tree -c --stat --summary master +diff-tree --cc --stat --summary master +# stat summary should show the diffstat and summary with the first parent +diff-tree -c --stat --summary side +diff-tree --cc --stat --summary side +# this one gives an extra newline after stat, which should be removed +# diff-tree --cc --patch-with-stat master +# this one gives an extra newline after stat, which should be removed +# other than that it shows the correct example -- stat and summary are +# against the first parent, and patch-looking combined diff follows. +diff-tree --cc --patch-with-stat --summary master +# this is correct +diff-tree --cc --patch-with-stat --summary side log master log -p master @@ -170,8 +186,11 @@ log --root master log --root -p master log --patch-with-stat master log --root --patch-with-stat master -#log --root --patch-with-stat --summary master +log --root --patch-with-stat --summary master +log --root -c --patch-with-stat --summary master +log --root --cc --patch-with-stat --summary master log -SF master +log -SF -p master whatchanged master whatchanged -p master @@ -180,10 +199,15 @@ whatchanged --root -p master whatchanged --patch-with-stat master whatchanged --root --patch-with-stat master whatchanged --root --patch-with-stat --summary master +whatchanged --root -c --patch-with-stat --summary master +whatchanged --root --cc --patch-with-stat --summary master whatchanged -SF master +whatchanged -SF -p master log --patch-with-stat master -- dir/ whatchanged --patch-with-stat master -- dir/ +log --patch-with-stat --summary master -- dir/ +whatchanged --patch-with-stat --summary master -- dir/ show initial show --root initial @@ -195,8 +219,6 @@ show --patch-with-stat side show --patch-with-raw side show --patch-with-stat --summary side - - EOF test_done diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master new file mode 100644 index 000000000..e6d0c8056 --- /dev/null +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master @@ -0,0 +1,35 @@ +$ git diff-tree --cc --patch-with-stat --summary master +176b998f5d647cbd77a9d8acf4531e930754d16d + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + + +diff --cc dir/sub +index cead32e,7289e35..992913c +--- a/dir/sub ++++ b/dir/sub +@@@ -1,6 -1,4 +1,8 @@@ + A + B + +C + +D + +E + +F ++ 1 ++ 2 +diff --cc file0 +index b414108,f4615da..10a8a9f +--- a/file0 ++++ b/file0 +@@@ -1,6 -1,6 +1,9 @@@ + 1 + 2 + 3 + +4 + +5 + +6 ++ A ++ B ++ C +$ diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side new file mode 100644 index 000000000..a61ad8cb1 --- /dev/null +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side @@ -0,0 +1,39 @@ +$ git diff-tree --cc --patch-with-stat --summary side +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 +$ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_master new file mode 100644 index 000000000..712ffd2d8 --- /dev/null +++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_master @@ -0,0 +1,6 @@ +$ git diff-tree --cc --stat --summary master +176b998f5d647cbd77a9d8acf4531e930754d16d + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) +$ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_side b/t/t4013/diff.diff-tree_--cc_--stat_--summary_side new file mode 100644 index 000000000..50362be7b --- /dev/null +++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_side @@ -0,0 +1,8 @@ +$ git diff-tree --cc --stat --summary side +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 +$ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_master new file mode 100644 index 000000000..8d5bdc985 --- /dev/null +++ b/t/t4013/diff.diff-tree_--cc_--stat_master @@ -0,0 +1,6 @@ +$ git diff-tree --cc --stat master +176b998f5d647cbd77a9d8acf4531e930754d16d + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) +$ diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_master new file mode 100644 index 000000000..2d239feb5 --- /dev/null +++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_master @@ -0,0 +1,6 @@ +$ git diff-tree -c --stat --summary master +176b998f5d647cbd77a9d8acf4531e930754d16d + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) +$ diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_side b/t/t4013/diff.diff-tree_-c_--stat_--summary_side new file mode 100644 index 000000000..2afcca11f --- /dev/null +++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_side @@ -0,0 +1,8 @@ +$ git diff-tree -c --stat --summary side +c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 +$ diff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_master new file mode 100644 index 000000000..226300b93 --- /dev/null +++ b/t/t4013/diff.diff-tree_-c_--stat_master @@ -0,0 +1,6 @@ +$ git diff-tree -c --stat master +176b998f5d647cbd77a9d8acf4531e930754d16d + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) +$ diff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ new file mode 100644 index 000000000..cc5537697 --- /dev/null +++ b/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ @@ -0,0 +1,72 @@ +$ git log --patch-with-stat --summary master -- dir/ +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +$ diff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master new file mode 100644 index 000000000..fafd9ee59 --- /dev/null +++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master @@ -0,0 +1,198 @@ +$ git log --root --cc --patch-with-stat --summary master +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' +--- + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + + +diff --cc dir/sub +index cead32e,7289e35..992913c +--- a/dir/sub ++++ b/dir/sub +@@@ -1,6 -1,4 +1,8 @@@ + A + B + +C + +D + +E + +F ++ 1 ++ 2 +diff --cc file0 +index b414108,f4615da..10a8a9f +--- a/file0 ++++ b/file0 +@@@ -1,6 -1,6 +1,9 @@@ + 1 + 2 + 3 + +4 + +5 + +6 ++ A ++ B ++ C + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 +++ + 3 files changed, 8 insertions(+), 0 deletions(-) + create mode 100644 dir/sub + create mode 100644 file0 + create mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +new file mode 100644 +index 0000000..35d242b +--- /dev/null ++++ b/dir/sub +@@ -0,0 +1,2 @@ ++A ++B +diff --git a/file0 b/file0 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file0 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file2 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +$ diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_master new file mode 100644 index 000000000..b24a50475 --- /dev/null +++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_master @@ -0,0 +1,165 @@ +$ git log --root --patch-with-stat --summary master +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 +++ + 3 files changed, 8 insertions(+), 0 deletions(-) + create mode 100644 dir/sub + create mode 100644 file0 + create mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +new file mode 100644 +index 0000000..35d242b +--- /dev/null ++++ b/dir/sub +@@ -0,0 +1,2 @@ ++A ++B +diff --git a/file0 b/file0 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file0 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file2 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +$ diff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master new file mode 100644 index 000000000..51e39cda0 --- /dev/null +++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master @@ -0,0 +1,198 @@ +$ git log --root -c --patch-with-stat --summary master +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' +--- + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + + +diff --combined dir/sub +index cead32e,7289e35..992913c +--- a/dir/sub ++++ b/dir/sub +@@@ -1,6 -1,4 +1,8 @@@ + A + B + +C + +D + +E + +F ++ 1 ++ 2 +diff --combined file0 +index b414108,f4615da..10a8a9f +--- a/file0 ++++ b/file0 +@@@ -1,6 -1,6 +1,9 @@@ + 1 + 2 + 3 + +4 + +5 + +6 ++ A ++ B ++ C + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 +++ + 3 files changed, 8 insertions(+), 0 deletions(-) + create mode 100644 dir/sub + create mode 100644 file0 + create mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +new file mode 100644 +index 0000000..35d242b +--- /dev/null ++++ b/dir/sub +@@ -0,0 +1,2 @@ ++A ++B +diff --git a/file0 b/file0 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file0 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file2 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +$ diff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_master new file mode 100644 index 000000000..db2264c6e --- /dev/null +++ b/t/t4013/diff.log_-SF_-p_master @@ -0,0 +1,18 @@ +$ git log -SF -p master +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +$ diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ new file mode 100644 index 000000000..054513f31 --- /dev/null +++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ @@ -0,0 +1,59 @@ +$ git whatchanged --patch-with-stat --summary master -- dir/ +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +$ diff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master new file mode 100644 index 000000000..370b5810e --- /dev/null +++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master @@ -0,0 +1,198 @@ +$ git whatchanged --root --cc --patch-with-stat --summary master +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' +--- + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + + +diff --cc dir/sub +index cead32e,7289e35..992913c +--- a/dir/sub ++++ b/dir/sub +@@@ -1,6 -1,4 +1,8 @@@ + A + B + +C + +D + +E + +F ++ 1 ++ 2 +diff --cc file0 +index b414108,f4615da..10a8a9f +--- a/file0 ++++ b/file0 +@@@ -1,6 -1,6 +1,9 @@@ + 1 + 2 + 3 + +4 + +5 + +6 ++ A ++ B ++ C + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 +++ + 3 files changed, 8 insertions(+), 0 deletions(-) + create mode 100644 dir/sub + create mode 100644 file0 + create mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +new file mode 100644 +index 0000000..35d242b +--- /dev/null ++++ b/dir/sub +@@ -0,0 +1,2 @@ ++A ++B +diff --git a/file0 b/file0 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file0 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file2 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +$ diff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master new file mode 100644 index 000000000..d6404b11b --- /dev/null +++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master @@ -0,0 +1,198 @@ +$ git whatchanged --root -c --patch-with-stat --summary master +commit 176b998f5d647cbd77a9d8acf4531e930754d16d +Merge: 889b315... c7a2ab9... +Author: A U Thor +Date: Mon Jun 26 00:04:00 2006 +0000 + + Merge branch 'side' +--- + dir/sub | 2 ++ + file0 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + + +diff --combined dir/sub +index cead32e,7289e35..992913c +--- a/dir/sub ++++ b/dir/sub +@@@ -1,6 -1,4 +1,8 @@@ + A + B + +C + +D + +E + +F ++ 1 ++ 2 +diff --combined file0 +index b414108,f4615da..10a8a9f +--- a/file0 ++++ b/file0 +@@@ -1,6 -1,6 +1,9 @@@ + 1 + 2 + 3 + +4 + +5 + +6 ++ A ++ B ++ C + +commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a +Author: A U Thor +Date: Mon Jun 26 00:03:00 2006 +0000 + + Side +--- + dir/sub | 2 ++ + file0 | 3 +++ + file3 | 4 ++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 file3 + +diff --git a/dir/sub b/dir/sub +index 35d242b..7289e35 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++1 ++2 +diff --git a/file0 b/file0 +index 01e79c3..f4615da 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++A ++B ++C +diff --git a/file3 b/file3 +new file mode 100644 +index 0000000..7289e35 +--- /dev/null ++++ b/file3 +@@ -0,0 +1,4 @@ ++A ++B ++1 ++2 + +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +--- + dir/sub | 2 ++ + file1 | 3 +++ + 2 files changed, 5 insertions(+), 0 deletions(-) + create mode 100644 file1 + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +diff --git a/file1 b/file1 +new file mode 100644 +index 0000000..b1e6722 +--- /dev/null ++++ b/file1 +@@ -0,0 +1,3 @@ ++A ++B ++C + +commit 7952a93e09bf565b5592766a438b40cd81f4846f +Author: A U Thor +Date: Mon Jun 26 00:01:00 2006 +0000 + + Second +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 --- + 3 files changed, 5 insertions(+), 3 deletions(-) + delete mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +index 35d242b..8422d40 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -1,2 +1,4 @@ + A + B ++C ++D +diff --git a/file0 b/file0 +index 01e79c3..b414108 100644 +--- a/file0 ++++ b/file0 +@@ -1,3 +1,6 @@ + 1 + 2 + 3 ++4 ++5 ++6 +diff --git a/file2 b/file2 +deleted file mode 100644 +index 01e79c3..0000000 +--- a/file2 ++++ /dev/null +@@ -1,3 +0,0 @@ +-1 +-2 +-3 + +commit 444ac553ac7612cc88969031b02b3767fb8a353a +Author: A U Thor +Date: Mon Jun 26 00:00:00 2006 +0000 + + Initial +--- + dir/sub | 2 ++ + file0 | 3 +++ + file2 | 3 +++ + 3 files changed, 8 insertions(+), 0 deletions(-) + create mode 100644 dir/sub + create mode 100644 file0 + create mode 100644 file2 + +diff --git a/dir/sub b/dir/sub +new file mode 100644 +index 0000000..35d242b +--- /dev/null ++++ b/dir/sub +@@ -0,0 +1,2 @@ ++A ++B +diff --git a/file0 b/file0 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file0 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..01e79c3 +--- /dev/null ++++ b/file2 +@@ -0,0 +1,3 @@ ++1 ++2 ++3 +$ diff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_master new file mode 100644 index 000000000..6a76f4e60 --- /dev/null +++ b/t/t4013/diff.whatchanged_-SF_-p_master @@ -0,0 +1,18 @@ +$ git whatchanged -SF -p master +commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +Author: A U Thor +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third + +diff --git a/dir/sub b/dir/sub +index 8422d40..cead32e 100644 +--- a/dir/sub ++++ b/dir/sub +@@ -2,3 +2,5 @@ A + B + C + D ++E ++F +$ -- 2.26.2