diff --git a/builtin-rm.c b/builtin-rm.c
index 56454ec8f4ed0612aa8932c4d5a3294da6a1f4cd..ee8247b08cd007f73d5dfffa560a9efe33d327b9 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
git_config(git_default_config, NULL);
- newfd = hold_locked_index(&lock_file, 1);
-
- if (read_cache() < 0)
- die("index file corrupt");
-
argc = parse_options(argc, argv, builtin_rm_options, builtin_rm_usage, 0);
if (!argc)
usage_with_options(builtin_rm_usage, builtin_rm_options);
if (!index_only)
setup_work_tree();
+ newfd = hold_locked_index(&lock_file, 1);
+
+ if (read_cache() < 0)
+ die("index file corrupt");
+
pathspec = get_pathspec(prefix, argv);
seen = NULL;
for (i = 0; pathspec[i] ; i++)