aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-20 23:41:59 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-20 23:41:59 -0700
commit22c09307bf0dc9999920763d94c95086e3a55642 (patch)
tree4c846519808d748b8dd691e8bf8fcdb52e8bde58 /t
parent99b52f2e495a2ccdb4ebf2a540a8bc81fa2bcf3d (diff)
parent5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9 (diff)
downloadgit-22c09307bf0dc9999920763d94c95086e3a55642.tar.gz
git-22c09307bf0dc9999920763d94c95086e3a55642.tar.xz
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
Diffstat (limited to 't')
-rwxr-xr-xt/t4002-diff-basic.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index 56bd3c2be..cc3681f16 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -169,6 +169,20 @@ test_expect_success \
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 &&
git diff-index --cached $tree_O >.test-a &&