summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-01-10 14:04:19 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-10 14:04:19 -0800
commitc12a978a354634f53cec757d387bc024b6d56142 (patch)
tree620dc14a0ca302933693c91786242b6077a85839 /t
parentMerge branch 'jk/repack-ref-racefix' into maint (diff)
parentcache-tree: invalidate i-t-a paths after generating trees (diff)
downloadtgif-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 ec35409f9c..2a4a749b4f 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