* lock_file structures, it isn't safe to free(lock_file).
*/
struct lock_file *lock_file;
* lock_file structures, it isn't safe to free(lock_file).
*/
struct lock_file *lock_file;
static const char * const apply_usage[] = {
N_("git apply [<options>] [<patch>...]"),
NULL
static const char * const apply_usage[] = {
N_("git apply [<options>] [<patch>...]"),
NULL
- if (state->update_index && newfd < 0)
- newfd = hold_locked_index(state->lock_file, 1);
+ if (state->update_index && state->newfd < 0)
+ state->newfd = hold_locked_index(state->lock_file, 1);
if (state->update_index) {
if (write_locked_index(&the_index, state->lock_file, COMMIT_LOCK))
die(_("Unable to write new index file"));
if (state->update_index) {
if (write_locked_index(&the_index, state->lock_file, COMMIT_LOCK))
die(_("Unable to write new index file"));