summaryrefslogtreecommitdiff
path: root/t/t4101/diff.2-3
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-03-11 00:38:27 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-03-10 22:18:05 -0800
commita68e6cea59a38a3be4feaf9cba9a409a8da92475 (patch)
tree204042db7a4a455f47ee44c7358eaa8206590bb2 /t/t4101/diff.2-3
parentmerge-ort: add data structures for an alternate tree traversal (diff)
downloadtgif-a68e6cea59a38a3be4feaf9cba9a409a8da92475.tar.xz
merge-ort: introduce wrappers for alternate tree traversal
Add traverse_trees_wrapper() and traverse_trees_wrapper_callback() functions. The former runs traverse_trees() with info->fn set to traverse_trees_wrapper_callback, in order to simply save all the entries without processing or recursing into any of them. This step allows extra computation to be done (e.g. checking some condition across all files) that can be used later. Then, after that is completed, it iterates over all the saved entries and calls the original info->fn callback with the saved data. Currently, this does nothing more than marginally slowing down the tree traversal since we do not take advantage of the opportunity to compute anything special in traverse_trees_wrapper_callback(), and thus the real callback will be called identically as it would have been without this extra wrapper. However, a subsequent commit will add some special computation of some values that the real callback will be able to use. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4101/diff.2-3')
0 files changed, 0 insertions, 0 deletions