Merge branch 'ar/commit-cleanup'
[gitweb.git] / builtin-rm.c
index bca2bd97036fdaf2e2bf99e308ba62e1acf4d9e8..a3d25e6a571584c486d252c5a8e2b182f3da86e3 100644 (file)
@@ -155,6 +155,9 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        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++)