diff options
author | David Turner <dturner@twopensource.com> | 2015-12-21 17:34:20 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-05 13:39:46 -0800 |
commit | d9c2bd560e1e7a3d4654fb6ef3f9037ad337eb01 (patch) | |
tree | 04df29e0820e079bf4c90570b6e1adf39af5a1ac /t/t7700-repack.sh | |
parent | Merge branch 'fr/rebase-i-continue-preserve-options' (diff) | |
download | tgif-d9c2bd560e1e7a3d4654fb6ef3f9037ad337eb01.tar.xz |
do_compare_entry: use already-computed path
In traverse_trees, we generate the complete traverse path for a
traverse_info. Later, in do_compare_entry, we used to go do a bunch
of work to compare the traverse_info to a cache_entry's name without
computing that path. But since we already have that path, we don't
need to do all that work. Instead, we can just put the generated
path into the traverse_info, and do the comparison more directly.
We copy the path because prune_traversal might mutate `base`. This
doesn't happen in any codepaths where do_compare_entry is called,
but it's better to be safe.
This makes git checkout much faster -- about 25% on Twitter's
monorepo. Deeper directory trees are likely to benefit more than
shallower ones.
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7700-repack.sh')
0 files changed, 0 insertions, 0 deletions