From: Felipe Contreras Date: Thu, 30 May 2013 13:56:18 +0000 (-0500) Subject: read-cache: fix wrong 'the_index' usage X-Git-Tag: v1.8.3.3~11^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=582eb8536bfc93e403b008e2d660a6f246a2ff46;p=git read-cache: fix wrong 'the_index' usage We are dealing with the 'istate' index, not 'the_index'. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/read-cache.c b/read-cache.c index fda78bc353..aeda7180ba 100644 --- a/read-cache.c +++ b/read-cache.c @@ -622,7 +622,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st, if (*ptr == '/') { struct cache_entry *foundce; ++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) { memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr); startPtr = ptr;