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
This commit is contained in:
Junio C Hamano 2020-07-30 13:20:33 -07:00
Родитель 37f382a924 a98f7fb366
Коммит a20e20e4c8
1 изменённых файлов: 0 добавлений и 14 удалений

Просмотреть файл

@ -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.