diff --git a/builtin-rm.c b/builtin-rm.c
index a0882bf1b045c1db91511e5e7c156a3198eb4c82..593d86744c41a1f28258b3adb6e6cd556a64b61f 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
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");
printf("rm '%s'\n", path);
if (remove_file_from_cache(path))
- die("git rm: unable to remove %s", path);
+ die("git-rm: unable to remove %s", path);
cache_tree_invalidate_path(active_cache_tree, path);
}
continue;
}
if (!removed)
- die("git rm: %s: %s", path, strerror(errno));
+ die("git-rm: %s: %s", path, strerror(errno));
}
}