From: Junio C Hamano Date: Mon, 03 Jun 2013 17:09:48 GMT Subject: Re: [PATCH 1/4] read-cache: fix wrong 'the_index' usage Message-ID: <7v4ndfi0ir.fsf@alter.siamese.dyndns.org> In-Reply-To: <1369922181-31016-2-git-send-email-felipe.contreras@gmail.com> Felipe Contreras writes: > We are dealing with the 'istate' index, not 'the_index'. > > Signed-off-by: Felipe Contreras > --- Good catch; will apply. > read-cache.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/read-cache.c b/read-cache.c > index 04ed561..5253ec5 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -626,7 +626,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;