summaryrefslogtreecommitdiff
path: root/t/t4002-diff-basic.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-21 06:41:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-21 06:41:59 (GMT)
commit22c09307bf0dc9999920763d94c95086e3a55642 (patch)
tree4c846519808d748b8dd691e8bf8fcdb52e8bde58 /t/t4002-diff-basic.sh
parent99b52f2e495a2ccdb4ebf2a540a8bc81fa2bcf3d (diff)
parent5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9 (diff)
downloadgit-22c09307bf0dc9999920763d94c95086e3a55642.zip
git-22c09307bf0dc9999920763d94c95086e3a55642.tar.gz
git-22c09307bf0dc9999920763d94c95086e3a55642.tar.bz2
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/t4002-diff-basic.sh')
-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 56bd3c2..cc3681f 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 &&