grep: move thread initialization a little lower
[gitweb.git] / apply.c
diff --git a/apply.c b/apply.c
index 705cf562f07098aafcd9f6e27105d2105714751f..2ed808d429969ff9516ba1bf166c3fdfa6d63ed5 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -4688,7 +4688,7 @@ static int apply_patch(struct apply_state *state,
                                                                 state->index_file,
                                                                 LOCK_DIE_ON_ERROR);
                else
-                       state->newfd = hold_locked_index(state->lock_file, 1);
+                       state->newfd = hold_locked_index(state->lock_file, LOCK_DIE_ON_ERROR);
        }
 
        if (state->check_index && read_apply_cache(state) < 0) {