diff --git a/apply.c b/apply.c index 8bbe6ed224..c8d4517c0a 100644 --- a/apply.c +++ b/apply.c @@ -4833,7 +4833,7 @@ static int apply_patch(struct apply_state *state, LOCK_DIE_ON_ERROR); } - if (state->check_index && read_apply_cache(state) < 0) { + if ((state->check_index || state->update_index) && read_apply_cache(state) < 0) { error(_("unable to read index file")); res = -128; goto end;