Skip to content

Commit

Permalink
t4013: add more tests around -c and --cc
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jun 27, 2006
1 parent 3c2f75b commit 47979d5
Show file tree
Hide file tree
Showing 18 changed files with 1,263 additions and 3 deletions.
28 changes: 25 additions & 3 deletions t/t4013-diff-various.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,34 @@ 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
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
Expand All @@ -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
Expand All @@ -195,8 +219,6 @@ show --patch-with-stat side
show --patch-with-raw side
show --patch-with-stat --summary side
EOF

test_done
35 changes: 35 additions & 0 deletions t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master
Original file line number Diff line number Diff line change
@@ -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
$
39 changes: 39 additions & 0 deletions t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side
Original file line number Diff line number Diff line change
@@ -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
$
6 changes: 6 additions & 0 deletions t/t4013/diff.diff-tree_--cc_--stat_--summary_master
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ git diff-tree --cc --stat --summary master
176b998f5d647cbd77a9d8acf4531e930754d16d
dir/sub | 2 ++
file0 | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
$
8 changes: 8 additions & 0 deletions t/t4013/diff.diff-tree_--cc_--stat_--summary_side
Original file line number Diff line number Diff line change
@@ -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
$
6 changes: 6 additions & 0 deletions t/t4013/diff.diff-tree_--cc_--stat_master
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ git diff-tree --cc --stat master
176b998f5d647cbd77a9d8acf4531e930754d16d
dir/sub | 2 ++
file0 | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
$
6 changes: 6 additions & 0 deletions t/t4013/diff.diff-tree_-c_--stat_--summary_master
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ git diff-tree -c --stat --summary master
176b998f5d647cbd77a9d8acf4531e930754d16d
dir/sub | 2 ++
file0 | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
$
8 changes: 8 additions & 0 deletions t/t4013/diff.diff-tree_-c_--stat_--summary_side
Original file line number Diff line number Diff line change
@@ -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
$
6 changes: 6 additions & 0 deletions t/t4013/diff.diff-tree_-c_--stat_master
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ git diff-tree -c --stat master
176b998f5d647cbd77a9d8acf4531e930754d16d
dir/sub | 2 ++
file0 | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
$
72 changes: 72 additions & 0 deletions t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
$ git log --patch-with-stat --summary master -- dir/
commit 176b998f5d647cbd77a9d8acf4531e930754d16d
Merge: 889b315... c7a2ab9...
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Merge branch 'side'

commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
Author: A U Thor <author@example.com>
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 <author@example.com>
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 <author@example.com>
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 <author@example.com>
Date: Mon Jun 26 00:00:00 2006 +0000

Initial
$
Loading

0 comments on commit 47979d5

Please sign in to comment.