Skip to content

Commit a20e20e

Browse files
committed
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
2 parents 37f382a + a98f7fb commit a20e20e

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

read-cache.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,20 +1171,6 @@ static int has_dir_name(struct index_state *istate,
11711171
return retval;
11721172
}
11731173

1174-
if (istate->cache_nr > 0 &&
1175-
ce_namelen(istate->cache[istate->cache_nr - 1]) > len) {
1176-
/*
1177-
* The directory prefix lines up with part of
1178-
* a longer file or directory name, but sorts
1179-
* after it, so this sub-directory cannot
1180-
* collide with a file.
1181-
*
1182-
* last: xxx/yy-file (because '-' sorts before '/')
1183-
* this: xxx/yy/abc
1184-
*/
1185-
return retval;
1186-
}
1187-
11881174
/*
11891175
* This is a possible collision. Fall through and
11901176
* let the regular search code handle it.

0 commit comments

Comments
 (0)