@@ -294,7 +294,7 @@ static int add_one_path(const struct cache_entry *old, const char *path, int len
}
option = allow_add ? ADD_CACHE_OK_TO_ADD : 0;
option |= allow_replace ? ADD_CACHE_OK_TO_REPLACE : 0;
- if (add_cache_entry(ce, option)) {
+ if (add_index_entry(istate, ce, option)) {
discard_cache_entry(ce);
return error("%s: cannot add to the index - missing --add option?", path);
}
@@ -672,12 +672,12 @@ static int unresolve_one(const char *path)
}
remove_file_from_index(istate, path);
- if (add_cache_entry(ce_2, ADD_CACHE_OK_TO_ADD)) {
+ if (add_index_entry(istate, ce_2, ADD_CACHE_OK_TO_ADD)) {
error("%s: cannot add our version to the index.", path);
ret = -1;
goto free_return;
}
- if (!add_cache_entry(ce_3, ADD_CACHE_OK_TO_ADD))
+ if (!add_index_entry(istate, ce_3, ADD_CACHE_OK_TO_ADD))
return 0;
error("%s: cannot add their version to the index.", path);
ret = -1;