cache.h: move remote/connect API out of it
[gitweb.git] / builtin / update-index.c
index 74986bf163d4dadb4497a90364c29ac71a801638..5c7762eef404e7ea21d88991a81407f1cb99f306 100644 (file)
@@ -593,6 +593,7 @@ struct refresh_params {
 static int refresh(struct refresh_params *o, unsigned int flag)
 {
        setup_work_tree();
+       read_cache_preload(NULL);
        *o->has_errors |= refresh_cache(o->flags | flag);
        return 0;
 }
@@ -795,7 +796,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
        };
 
        if (argc == 2 && !strcmp(argv[1], "-h"))
-               usage(update_index_usage[0]);
+               usage_with_options(update_index_usage, options);
 
        git_config(git_default_config, NULL);