summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-30 20:20:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-30 20:20:33 (GMT)
commita20e20e4c8fe6c13e03af8109644a84d8f4e7f7f (patch)
treee455d6f3885e6b947ca4705bd94335c7430671f4
parent37f382a924f2cb658f7b61036b2fc9fe1314d3a6 (diff)
parenta98f7fb36679a98caa0b804d567b6b2fa8f8ef41 (diff)
downloadgit-a20e20e4c8fe6c13e03af8109644a84d8f4e7f7f.zip
git-a20e20e4c8fe6c13e03af8109644a84d8f4e7f7f.tar.gz
git-a20e20e4c8fe6c13e03af8109644a84d8f4e7f7f.tar.bz2
Merge branch 'rs/add-index-entry-optim-fix' into master
Fix to an ancient bug caused by an over-eager attempt for optimization. * rs/add-index-entry-optim-fix: read-cache: remove bogus shortcut
-rw-r--r--read-cache.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/read-cache.c b/read-cache.c
index aa427c5..8ed1c29 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1171,20 +1171,6 @@ static int has_dir_name(struct index_state *istate,
return retval;
}
- if (istate->cache_nr > 0 &&
- ce_namelen(istate->cache[istate->cache_nr - 1]) > len) {
- /*
- * The directory prefix lines up with part of
- * a longer file or directory name, but sorts
- * after it, so this sub-directory cannot
- * collide with a file.
- *
- * last: xxx/yy-file (because '-' sorts before '/')
- * this: xxx/yy/abc
- */
- return retval;
- }
-
/*
* This is a possible collision. Fall through and
* let the regular search code handle it.