5 int cmd__read_cache(int argc, const char **argv)
8 const char *name = NULL;
10 if (argc > 1 && skip_prefix(argv[1], "--print-and-refresh=", &name)) {
16 cnt = strtol(argv[1], NULL, 0);
17 setup_git_directory();
18 git_config(git_default_config, NULL);
19 for (i = 0; i < cnt; i++) {
24 refresh_index(&the_index, REFRESH_QUIET,
26 pos = index_name_pos(&the_index, name, strlen(name));
28 die("%s not in index", name);
29 printf("%s is%s up to date\n", name,
30 ce_uptodate(the_index.cache[pos]) ? "" : " not");
31 write_file(name, "%d\n", i);