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>
Felipe Contreras committed
May 30, 2013 at 08:56 UTC
582eb8536bfc93e403b008e2d660a6f246a2ff46
1 file changed
+1
-1
read-cache.c
+1
-1
@@ -622,7 +622,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
622
if (*ptr == '/') {
623
struct cache_entry *foundce;
624
++ptr;
625
- foundce = index_name_exists(&the_index, ce->name, ptr - ce->name, ignore_case);
625
+ foundce = index_name_exists(istate, ce->name, ptr - ce->name, ignore_case);
626
if (foundce) {
627
memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr);
628
startPtr = ptr;