From: Junio C Hamano Date: Thu, 21 Aug 2008 06:41:59 +0000 (-0700) Subject: Merge branch 'kh/diff-tree' X-Git-Tag: v1.6.1-rc1~330 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/22c09307bf0dc9999920763d94c95086e3a55642?ds=inline;hp=-c Merge branch 'kh/diff-tree' * kh/diff-tree: Add test for diff-tree --stdin with two trees Teach git diff-tree --stdin to diff trees diff-tree: Note that the commit ID is printed with --stdin Refactoring: Split up diff_tree_stdin --- 22c09307bf0dc9999920763d94c95086e3a55642 diff --combined t/t4002-diff-basic.sh index 56bd3c2be1,27743c4c59..cc3681f161 --- a/t/t4002-diff-basic.sh +++ b/t/t4002-diff-basic.sh @@@ -7,7 -7,7 +7,7 @@@ test_description='Test diff raw-output ' . ./test-lib.sh -. ../lib-read-tree-m-3way.sh +. "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh cat >.test-plain-OA <<\EOF :000000 100644 0000000000000000000000000000000000000000 ccba72ad3888a3520b39efcf780b9ee64167535d A AA @@@ -168,6 -168,20 +168,20 @@@ test_expect_success 'git diff-tree -r $tree_A $tree_B >.test-a && cmp -s .test-a .test-recursive-AB' + test_expect_success \ + 'diff-tree --stdin of known trees.' \ + 'echo $tree_A $tree_B | git diff-tree --stdin > .test-a && + echo $tree_A $tree_B > .test-plain-ABx && + cat .test-plain-AB >> .test-plain-ABx && + cmp -s .test-a .test-plain-ABx' + + test_expect_success \ + 'diff-tree --stdin of known trees.' \ + 'echo $tree_A $tree_B | git diff-tree -r --stdin > .test-a && + echo $tree_A $tree_B > .test-recursive-ABx && + cat .test-recursive-AB >> .test-recursive-ABx && + cmp -s .test-a .test-recursive-ABx' + test_expect_success \ 'diff-cache O with A in cache' \ 'git read-tree $tree_A &&