diff options
Diffstat (limited to 'builtin/reset.c')
| -rw-r--r-- | builtin/reset.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index 7154f88826..dc50ffc1ac 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -7,7 +7,9 @@ * * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano */ + #define USE_THE_REPOSITORY_VARIABLE + #include "builtin.h" #include "advice.h" #include "config.h" @@ -418,6 +420,9 @@ int cmd_reset(int argc, oidcpy(&oid, &tree->object.oid); } + prepare_repo_settings(the_repository); + the_repository->settings.command_requires_full_index = 0; + if (patch_mode) { if (reset_type != NONE) die(_("options '%s' and '%s' cannot be used together"), "--patch", "--{hard,mixed,soft}"); @@ -455,9 +460,6 @@ int cmd_reset(int argc, if (intent_to_add && reset_type != MIXED) die(_("the option '%s' requires '%s'"), "-N", "--mixed"); - prepare_repo_settings(the_repository); - the_repository->settings.command_requires_full_index = 0; - if (repo_read_index(the_repository) < 0) die(_("index file corrupt")); |
