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:
commit
a20e20e4c8
14
read-cache.c
14
read-cache.c
@ -1171,20 +1171,6 @@ static int has_dir_name(struct index_state *istate,
|
|||||||
return retval;
|
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
|
* This is a possible collision. Fall through and
|
||||||
* let the regular search code handle it.
|
* let the regular search code handle it.
|
||||||
|
Loading…
Reference in New Issue
Block a user