aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-10 14:04:19 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-10 14:04:19 -0800
commitc12a978a354634f53cec757d387bc024b6d56142 (patch)
tree620dc14a0ca302933693c91786242b6077a85839 /t
parentf70eec840065ca598272979960073b1b50b5ad03 (diff)
parenteec3e7e406867487036cf447fe8fa18740824b2f (diff)
downloadgit-c12a978a354634f53cec757d387bc024b6d56142.tar.gz
git-c12a978a354634f53cec757d387bc024b6d56142.tar.xz
Merge branch 'nd/invalidate-i-t-a-cache-tree' into maint
* nd/invalidate-i-t-a-cache-tree: cache-tree: invalidate i-t-a paths after generating trees cache-tree: fix writing cache-tree when CE_REMOVE is present cache-tree: replace "for" loops in update_one with "while" loops cache-tree: remove dead i-t-a code in verify_cache()
Diffstat (limited to 't')
-rwxr-xr-xt/t2203-add-intent.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index ec35409f9..2a4a749b4 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -62,5 +62,25 @@ test_expect_success 'can "commit -a" with an i-t-a entry' '
git commit -a -m all
'
+test_expect_success 'cache-tree invalidates i-t-a paths' '
+ git reset --hard &&
+ mkdir dir &&
+ : >dir/foo &&
+ git add dir/foo &&
+ git commit -m foo &&
+
+ : >dir/bar &&
+ git add -N dir/bar &&
+ git diff --cached --name-only >actual &&
+ echo dir/bar >expect &&
+ test_cmp expect actual &&
+
+ git write-tree >/dev/null &&
+
+ git diff --cached --name-only >actual &&
+ echo dir/bar >expect &&
+ test_cmp expect actual
+'
+
test_done