summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:53 -0700
commit7e794d0a3f7ad4a37541539b823d5b9afdc10ce3 (patch)
treee0ee853dbcf38a57195490ffc547039e4348de5f /t
parentMerge branch 'ds/reachable' (diff)
parentDocument update for nd/unpack-trees-with-cache-tree (diff)
downloadtgif-7e794d0a3f7ad4a37541539b823d5b9afdc10ce3.tar.xz
Merge branch 'nd/unpack-trees-with-cache-tree'
The unpack_trees() API used in checking out a branch and merging walks one or more trees along with the index. When the cache-tree in the index tells us that we are walking a tree whose flattened contents is known (i.e. matches a span in the index), as linearly scanning a span in the index is much more efficient than having to open tree objects recursively and listing their entries, the walk can be optimized, which is done in this topic. * nd/unpack-trees-with-cache-tree: Document update for nd/unpack-trees-with-cache-tree cache-tree: verify valid cache-tree in the test suite unpack-trees: add missing cache invalidation unpack-trees: reuse (still valid) cache-tree from src_index unpack-trees: reduce malloc in cache-tree walk unpack-trees: optimize walking same trees with cache-tree unpack-trees: add performance tracing trace.h: support nested performance tracing
Diffstat (limited to 't')
-rw-r--r--t/README4
-rw-r--r--t/test-lib.sh6
2 files changed, 10 insertions, 0 deletions
diff --git a/t/README b/t/README
index 9028b47d92..204b9f4cc5 100644
--- a/t/README
+++ b/t/README
@@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE=<n> exercises the uncomon pack-objects code
path where deltas larger than this limit require extra memory
allocation for bookkeeping.
+GIT_TEST_VALIDATE_INDEX_CACHE_ENTRIES=<boolean> checks that cache-tree
+records are valid when the index is written out or after a merge. This
+is mostly to catch missing invalidation. Default is true.
+
Naming Tests
------------
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 44288cbb59..3f95bfda60 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1083,6 +1083,12 @@ else
test_set_prereq C_LOCALE_OUTPUT
fi
+if test -z "$GIT_TEST_CHECK_CACHE_TREE"
+then
+ GIT_TEST_CHECK_CACHE_TREE=true
+ export GIT_TEST_CHECK_CACHE_TREE
+fi
+
test_lazy_prereq PIPE '
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&