From 3c2f75b590c35675cc67dc43cabe2298bec86afc Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 26 Jun 2006 13:46:52 -0700 Subject: t4013: add tests for diff/log family output options. Signed-off-by: Junio C Hamano --- t/t4013/diff.log_-p_master | 113 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 t/t4013/diff.log_-p_master (limited to 't/t4013/diff.log_-p_master') diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_master new file mode 100644 index 0000000000..e82a72f6f8 --- /dev/null +++ b/t/t4013/diff.log_-p_master @@ -0,0 +1,113 @@ +$ git log -p 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 + +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 + +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 + +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 +$ -- cgit v1.2.3 From a40d384caca008c0334a35e9ac298f2eeb5decd2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 13 Jul 2006 19:51:12 -0700 Subject: t4013 diff format tests update This changes one test commit in the sequence to have more than one lines of commit log. A few output formats (--pretty=email aka format-patch and --pretty=oneline) need to behave differently on single and multi-line log, and this change will help catching breakages. Signed-off-by: Junio C Hamano --- t/t4013/diff.log_-p_master | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 't/t4013/diff.log_-p_master') diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_master index e82a72f6f8..f8fefef2c3 100644 --- a/t/t4013/diff.log_-p_master +++ b/t/t4013/diff.log_-p_master @@ -1,6 +1,6 @@ $ git log -p master -commit 176b998f5d647cbd77a9d8acf4531e930754d16d -Merge: 889b315... c7a2ab9... +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 +Merge: 9a6d494... c7a2ab9... Author: A U Thor Date: Mon Jun 26 00:04:00 2006 +0000 @@ -43,7 +43,7 @@ index 0000000..7289e35 +1 +2 -commit 889b315013ef9f2e2f90aa0b054b267c8a557847 +commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor Date: Mon Jun 26 00:02:00 2006 +0000 @@ -69,11 +69,13 @@ index 0000000..b1e6722 +B +C -commit 7952a93e09bf565b5592766a438b40cd81f4846f +commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Author: A U Thor Date: Mon Jun 26 00:01:00 2006 +0000 Second + + This is the second commit. diff --git a/dir/sub b/dir/sub index 35d242b..8422d40 100644 -- cgit v1.2.3 From 7fcda9201e192413c2e63fe35ce6664dbc81705d Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 13 Feb 2009 23:10:41 +0100 Subject: log: do not print ellipses with --abbrev-commit 'git log --abbrev-commit' added an ellipsis to all commit names that were abbreviated. This was particularly annoying if you wanted to cut&paste the sha1 from the terminal, since selecting by word would pick up '...' too. So use find_unique_abbrev() instead of diff_unique_abbrev() in all log-related commit sha1 printing routines, and also change the formatting of the 'Merge: parent1 parent2' line output via pretty_print_commit(). Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- t/t4013/diff.log_-p_master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t4013/diff.log_-p_master') diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_master index f8fefef2c3..bf1326dc36 100644 --- a/t/t4013/diff.log_-p_master +++ b/t/t4013/diff.log_-p_master @@ -1,6 +1,6 @@ $ git log -p master commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 -Merge: 9a6d494... c7a2ab9... +Merge: 9a6d494 c7a2ab9 Author: A U Thor Date: Mon Jun 26 00:04:00 2006 +0000 -- cgit v1.2.3