sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / update-index.c
index faa16c61f10629866982ecce9f9dc9224bd79216..e19da77edcaa024cc2bffc6fa8818c2b1cf0d4b6 100644 (file)
@@ -782,7 +782,7 @@ struct refresh_params {
 static int refresh(struct refresh_params *o, unsigned int flag)
 {
        setup_work_tree();
-       read_cache_preload(NULL);
+       read_cache();
        *o->has_errors |= refresh_cache(o->flags | flag);
        return 0;
 }
@@ -1086,6 +1086,8 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                case PARSE_OPT_HELP:
                case PARSE_OPT_ERROR:
                        exit(129);
+               case PARSE_OPT_COMPLETE:
+                       exit(0);
                case PARSE_OPT_NON_OPTION:
                case PARSE_OPT_DONE:
                {