Document update for nd/unpack-trees-with-cache-tree
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 25 Aug 2018 13:02:09 +0000 (15:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Aug 2018 19:26:17 +0000 (12:26 -0700)
Fix an incorrect comment in the new code added in b4da37380b
(unpack-trees: optimize walking same trees with cache-tree -
2018-08-18) and document about the new test variable that is enabled
by default in test-lib.sh in 4592e6080f (cache-tree: verify valid
cache-tree in the test suite - 2018-08-18)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README
unpack-trees.c
index 8373a27fea38b1ec111e80d203bf61f1143b7861..0e7cc2373419a7297a73978e01319e8ccc23402c 100644 (file)
--- a/t/README
+++ b/t/README
@@ -315,6 +315,10 @@ packs on demand. This normally only happens when the object size is
 over 2GB. This variable forces the code path on any object larger than
 <n> bytes.
 
+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
 ------------
 
index 3394540842d9ba565132b767cf38edb928886161..515c37437308b097c7f26442de19bb35d92c8da8 100644 (file)
@@ -676,8 +676,8 @@ static int index_pos_by_traverse_info(struct name_entry *names,
 
 /*
  * Fast path if we detect that all trees are the same as cache-tree at this
- * path. We'll walk these trees recursively using cache-tree/index instead of
- * ODB since already know what these trees contain.
+ * path. We'll walk these trees in an iterative loop using cache-tree/index
+ * instead of ODB since we already know what these trees contain.
  */
 static int traverse_by_cache_tree(int pos, int nr_entries, int nr_names,
                                  struct name_entry *names,