summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-14 09:34:23 -0700
committerJunio C Hamano <gitster@pobox.com>2010-07-14 09:34:23 -0700
commitc9a9766328763a776201b4b11263652b66ff9465 (patch)
treeb2444ce4dc11a84e640e8343e2ce141a23a0bf35 /t
parentc7d1d1b1329a104d2f7fe6307da4344288bc8e01 (diff)
parent037c43c68e220739e690540de89a6d5835fefe73 (diff)
downloadgit-c9a9766328763a776201b4b11263652b66ff9465.tar.gz
Merge branch 'jc/read-tree-cache-tree-fix'
* jc/read-tree-cache-tree-fix: Fix "read-tree -m A B" priming the cache-tree
Diffstat (limited to 't')
-rwxr-xr-xt/t1001-read-tree-m-2way.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
index 6327d205cb..0c562bb820 100755
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -390,4 +390,20 @@ test_expect_success \
git ls-files --stage | tee >treeMcheck.out &&
test_cmp treeM.out treeMcheck.out'
+test_expect_success '-m references the correct modified tree' '
+ echo >file-a &&
+ echo >file-b &&
+ git add file-a file-b &&
+ git commit -a -m "test for correct modified tree"
+ git branch initial-mod &&
+ echo b >file-b &&
+ git commit -a -m "B" &&
+ echo a >file-a &&
+ git add file-a &&
+ git ls-tree $(git write-tree) file-a >expect &&
+ git read-tree -m HEAD initial-mod &&
+ git ls-tree $(git write-tree) file-a >actual &&
+ test_cmp expect actual
+'
+
test_done