]> git.ipfire.org Git - thirdparty/git.git/blobdiff - read-cache.c
Merge branch 'es/test-cmp-typocatcher'
[thirdparty/git.git] / read-cache.c
index aa427c5c170f02c0c2300f4de5e16a03c83dd975..8ed1c29b541121214ab50b21a2f262edc406c807 100644 (file)
@@ -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.