summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2017-04-19 17:06:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-20 03:33:01 (GMT)
commit06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8 (patch)
treef32cb511019cbb2065a5ad762d29dcc13402d111 /sequencer.c
parente5494631ed94017da862d55eb6393a0d01d8b91d (diff)
downloadgit-06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8.zip
git-06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8.tar.gz
git-06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8.tar.bz2
read-cache: speed up has_dir_name (part 1)
Teach has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. has_dir_name() is looking for file/directory collisions in the index and has to consider each sub-directory prefix in turn. This can cause multiple binary searches for each path. During operations like checkout, merge_working_tree() populates the new index in sorted order, so we expect to be able to append in many cases. This commit is part 1 of 2. This commit handles the top of has_dir_name() and the trivial optimization. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
0 files changed, 0 insertions, 0 deletions