read-cache: fix wrong 'the_index' usage

We are dealing with the 'istate' index, not 'the_index'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2013-05-30 08:56:18 -05:00 committed by Junio C Hamano
parent 15999998fb
commit 582eb8536b

View File

@ -622,7 +622,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
if (*ptr == '/') { if (*ptr == '/') {
struct cache_entry *foundce; struct cache_entry *foundce;
++ptr; ++ptr;
foundce = index_name_exists(&the_index, ce->name, ptr - ce->name, ignore_case); foundce = index_name_exists(istate, ce->name, ptr - ce->name, ignore_case);
if (foundce) { if (foundce) {
memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr); memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr);
startPtr = ptr; startPtr = ptr;