@@ -233,7 +233,7 @@ static int test_if_untracked_cache_is_supported(void)
static int mark_ce_flags(const char *path, int flag, int mark)
{
int namelen = strlen(path);
- int pos = cache_name_pos(path, namelen);
+ int pos = index_name_pos(istate, path, namelen);
if (0 <= pos) {
mark_fsmonitor_invalid(istate, istate->cache[pos]);
if (mark)
@@ -327,7 +327,7 @@ static int add_one_path(const struct cache_entry *old, const char *path, int len
static int process_directory(const char *path, int len, struct stat *st)
{
struct object_id oid;
- int pos = cache_name_pos(path, len);
+ int pos = index_name_pos(istate, path, len);
/* Exact match: file or existing gitlink */
if (pos >= 0) {
@@ -377,7 +377,7 @@ static int process_path(const char *path, struct stat *st, int stat_errno)
if (has_symlink_leading_path(path, len))
return error("'%s' is beyond a symbolic link", path);
- pos = cache_name_pos(path, len);
+ pos = index_name_pos(istate, path, len);
ce = pos < 0 ? NULL : istate->cache[pos];
if (ce && ce_skip_worktree(ce)) {
/*
@@ -426,7 +426,7 @@ static void chmod_path(char flip, const char *path)
int pos;
struct cache_entry *ce;
- pos = cache_name_pos(path, strlen(path));
+ pos = index_name_pos(istate, path, strlen(path));
if (pos < 0)
goto fail;
ce = istate->cache[pos];
@@ -623,7 +623,7 @@ static int unresolve_one(const char *path)
struct cache_entry *ce_2 = NULL, *ce_3 = NULL;
/* See if there is such entry in the index. */
- pos = cache_name_pos(path, namelen);
+ pos = index_name_pos(istate, path, namelen);
if (0 <= pos) {
/* already merged */
pos = unmerge_cache_entry_at(pos);