Skip to content

Commit 582eb85

Browse files
felipecgitster
authored andcommitted
read-cache: fix wrong 'the_index' usage
We are dealing with the 'istate' index, not 'the_index'. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1599999 commit 582eb85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

read-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
622622
if (*ptr == '/') {
623623
struct cache_entry *foundce;
624624
++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);
626626
if (foundce) {
627627
memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr);
628628
startPtr = ptr;

0 commit comments

Comments
 (0)