diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-19 11:28:06 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-19 11:28:06 -0700 |
commit | 679639904da05f7d84e9215960e76dd0f3353328 (patch) | |
tree | a60e891d49b1de93d135fd5d79171f4c09b98040 /builtin-rm.c | |
parent | 03db4525d38119f7778d6e9117f27c47db8466d4 (diff) | |
parent | a1b6fb04b1c1b581dfac5c13641af8b3ae44810f (diff) | |
download | git-679639904da05f7d84e9215960e76dd0f3353328.tar.gz git-679639904da05f7d84e9215960e76dd0f3353328.tar.xz |
Merge branch 'maint'
* maint:
GIT 1.5.6.4
builtin-rm: fix index lock file path
http-fetch: do not SEGV after fetching a bad pack idx file
rev-list: honor --quiet option
api-run-command.txt: typofix
Diffstat (limited to 'builtin-rm.c')
-rw-r--r-- | builtin-rm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin-rm.c b/builtin-rm.c index 56454ec8f..ee8247b08 100644 --- a/builtin-rm.c +++ b/builtin-rm.c @@ -146,11 +146,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix) 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); @@ -158,6 +153,11 @@ int cmd_rm(int argc, const char **argv, const char *prefix) 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++) |