diff --git a/builtin-rm.c b/builtin-rm.c
index bca2bd97036fdaf2e2bf99e308ba62e1acf4d9e8..22c9bd1c6cf2d372e0262506cc1e21daebdf579a 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
const char **pathspec;
char *seen;
- git_config(git_default_config);
+ git_config(git_default_config, NULL);
newfd = hold_locked_index(&lock_file, 1);
if (!argc)
usage_with_options(builtin_rm_usage, builtin_rm_options);
+ if (!index_only)
+ setup_work_tree();
+
pathspec = get_pathspec(prefix, argv);
seen = NULL;
for (i = 0; pathspec[i] ; i++)
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file))
+ commit_locked_index(&lock_file))
die("Unable to write new index file");
}