aboutsummaryrefslogtreecommitdiff
path: root/builtin-rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rm.c')
-rw-r--r--builtin-rm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-rm.c b/builtin-rm.c
index 8af3d7eb4..593d86744 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -52,9 +52,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
git_config(git_default_config);
- newfd = hold_lock_file_for_update(&lock_file, get_index_file());
- if (newfd < 0)
- die("unable to create new index file");
+ newfd = hold_lock_file_for_update(&lock_file, get_index_file(), 1);
if (read_cache() < 0)
die("index file corrupt");