merge: narrow scope of merge_names
[gitweb.git] / builtin / checkout-index.c
index 9e49bf2f5695f0deaf7184ca7e9ef38059e3d680..383dccf93ef4eceb873eee4cd63e6781854b295c 100644 (file)
@@ -5,7 +5,7 @@
  *
  */
 #include "builtin.h"
-#include "cache.h"
+#include "lockfile.h"
 #include "quote.h"
 #include "cache-tree.h"
 #include "parse-options.h"
@@ -135,6 +135,7 @@ static int option_parse_u(const struct option *opt,
        int *newfd = opt->value;
 
        state.refresh_cache = 1;
+       state.istate = &the_index;
        if (*newfd < 0)
                *newfd = hold_locked_index(&lock_file, 1);
        return 0;