Merge branch 'en/incl-forward-decl'
[gitweb.git] / builtin / checkout-index.c
index b0e78b819db3138f1c5ac4fe4b5d850ab306b470..d92db62fbdf15c14ff3d85b767a069b22aa3897d 100644 (file)
@@ -157,7 +157,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
        struct option builtin_checkout_index_options[] = {
                OPT_BOOL('a', "all", &all,
                        N_("check out all files in the index")),
-               OPT__FORCE(&force, N_("force overwrite of existing files")),
+               OPT__FORCE(&force, N_("force overwrite of existing files"), 0),
                OPT__QUIET(&quiet,
                        N_("no warning for existing files and files not in index")),
                OPT_BOOL('n', "no-create", &not_new,
@@ -190,6 +190,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
 
        argc = parse_options(argc, argv, prefix, builtin_checkout_index_options,
                        builtin_checkout_index_usage, 0);
+       state.istate = &the_index;
        state.force = force;
        state.quiet = quiet;
        state.not_new = not_new;