@@ -430,7 +430,7 @@ static void chmod_path(char flip, const char *path)
if (pos < 0)
goto fail;
ce = istate->cache[pos];
- if (chmod_cache_entry(ce, flip) < 0)
+ if (chmod_index_entry(istate, ce, flip) < 0)
goto fail;
report("chmod %cx '%s'", flip, path);
@@ -626,7 +626,7 @@ static int unresolve_one(const char *path)
pos = index_name_pos(istate, path, namelen);
if (0 <= pos) {
/* already merged */
- pos = unmerge_cache_entry_at(pos);
+ pos = unmerge_index_entry_at(istate, pos);
if (pos < istate->cache_nr) {
const struct cache_entry *ce = istate->cache[pos];
if (ce_stage(ce) &&
@@ -777,8 +777,9 @@ struct refresh_params {
static int refresh(struct refresh_params *o, unsigned int flag)
{
setup_work_tree();
- read_cache();
- *o->has_errors |= refresh_cache(o->flags | flag);
+ repo_read_index(repo);
+ *o->has_errors |= refresh_index(istate, o->flags | flag,
+ NULL, NULL, NULL);
return 0;
}
@@ -814,7 +815,7 @@ static int resolve_undo_clear_callback(const struct option *opt,
{
BUG_ON_OPT_NEG(unset);
BUG_ON_OPT_ARG(arg);
- resolve_undo_clear();
+ resolve_undo_clear_index(istate);
return 0;
}
@@ -421,7 +421,6 @@ extern struct index_state the_index;
#define cache_dir_exists(name, namelen) index_dir_exists(&the_index, (name), (namelen))
#define cache_name_is_other(name, namelen) index_name_is_other(&the_index, (name), (namelen))
#define resolve_undo_clear() resolve_undo_clear_index(&the_index)
-#define unmerge_cache_entry_at(at) unmerge_index_entry_at(&the_index, at)
#define unmerge_cache(pathspec) unmerge_index(&the_index, pathspec)
#define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
#define hold_locked_index(lock_file, flags) repo_hold_locked_index(the_repository, (lock_file), (flags))