diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-02 10:39:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-02 10:39:51 -0800 |
commit | f97335b132c80a2282d7648885a4686b85595088 (patch) | |
tree | d2cff0513e4d65cecc229ab5a6126678017f29e4 /t | |
parent | 229096a591cb1cd9b309feca0b786be0a0adbe04 (diff) | |
parent | eec3e7e406867487036cf447fe8fa18740824b2f (diff) | |
download | git-f97335b132c80a2282d7648885a4686b85595088.tar.gz |
Merge branch 'nd/invalidate-i-t-a-cache-tree'
After "git add -N" and then writing a tree object out of the
index, the cache-tree data structure got corrupted.
* 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-x | t/t2203-add-intent.sh | 20 |
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 |