X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-mv.c;h=f633d81424f5e41cb85ac660dbdc9f4913852673;hb=4cefa495ca91ad833084ebf3f73c77997920ae9b;hp=1b20028c67dec2f9954cb107620bd863b4b3a264;hpb=050dfc4535578c2c49832ffeb3f05dbd4c6adff2;p=git.git diff --git a/builtin-mv.c b/builtin-mv.c index 1b20028c6..f633d8142 100644 --- a/builtin-mv.c +++ b/builtin-mv.c @@ -64,15 +64,15 @@ int cmd_mv(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, prefix, builtin_mv_options, builtin_mv_usage, 0); if (--argc < 1) usage_with_options(builtin_mv_usage, builtin_mv_options); + newfd = hold_locked_index(&lock_file, 1); + if (read_cache() < 0) + die("index file corrupt"); + source = copy_pathspec(prefix, argv, argc, 0); modes = xcalloc(argc, sizeof(enum update_mode)); dest_path = copy_pathspec(prefix, argv + argc, 1, 0);