]> git.ipfire.org Git - thirdparty/git.git/blobdiff - read-cache.c
employ new explicit "exists in index?" API
[thirdparty/git.git] / read-cache.c
index 885943a6df77da646481c34d2876d7fdaa5c12b8..b8d3759b53c573075b0bd7af9ff1f7fb29b2715a 100644 (file)
@@ -643,7 +643,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
                        if (*ptr == '/') {
                                struct cache_entry *foundce;
                                ++ptr;
-                               foundce = index_name_exists(istate, ce->name, ptr - ce->name, ignore_case);
+                               foundce = index_dir_exists(istate, ce->name, ptr - ce->name);
                                if (foundce) {
                                        memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr);
                                        startPtr = ptr;
@@ -652,7 +652,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
                }
        }
 
-       alias = index_name_exists(istate, ce->name, ce_namelen(ce), ignore_case);
+       alias = index_file_exists(istate, ce->name, ce_namelen(ce), ignore_case);
        if (alias && !ce_stage(alias) && !ie_match_stat(istate, alias, st, ce_option)) {
                /* Nothing changed, really */
                free(ce);