git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 4/4] Add test for diff-tree --stdin with two trees

From
Karl Hasselström <kha@treskal.com>
Date
Aug 10, 2008, 16:13 UTC
Message-ID
<20080810161304.7116.56769.stgit@yoghurt>
In-Reply-To
<20080810161035.7116.2171.stgit@yoghurt>
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 t/t4002-diff-basic.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index a4cfde6..27743c4 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 &&
Previous: Karl HasselströmNext: Karl Hasselström
Message 5 of 6 in “Teach git diff-tree --stdin to diff trees”
  1. 0/4 Teach git diff-tree --stdin to diff treesKarl Hasselström, Aug 10, 2008
  2. 1/4 Refactoring: Split up diff_tree_stdinKarl Hasselström, Aug 10, 2008
  3. 2/4 diff-tree: Note that the commit ID is printed with --stdinKarl Hasselström, Aug 10, 2008
  4. 3/4 Teach git diff-tree --stdin to diff treesKarl Hasselström, Aug 10, 2008
  5. 4/4 Add test for diff-tree --stdin with two treesKarl Hasselström, Aug 10, 2008
  6. Karl HasselströmAug 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.