Merge branch 'mm/doc-no-dashed-git'
[gitweb.git] / builtin / update-index.c
index fe84003b4fa05c377bb4ab1de04a7cd1c9ae4d5d..07c10bcb7d82c19becf424f9ab63954c9e58f93f 100644 (file)
@@ -282,7 +282,7 @@ static int add_one_path(const struct cache_entry *old, const char *path, int len
        fill_stat_cache_info(ce, st);
        ce->ce_mode = ce_mode_from_stat(old, st->st_mode);
 
-       if (index_path(&ce->oid, path, st,
+       if (index_path(&the_index, &ce->oid, path, st,
                       info_only ? 0 : HASH_WRITE_OBJECT)) {
                discard_cache_entry(ce);
                return -1;
@@ -669,7 +669,7 @@ static int unresolve_one(const char *path)
                ret = -1;
                goto free_return;
        }
-       if (!oidcmp(&ce_2->oid, &ce_3->oid) &&
+       if (oideq(&ce_2->oid, &ce_3->oid) &&
            ce_2->ce_mode == ce_3->ce_mode) {
                fprintf(stderr, "%s: identical in both, skipping.\n",
                        path);
@@ -754,7 +754,7 @@ static int do_reupdate(int ac, const char **av,
                        old = read_one_ent(NULL, &head_oid,
                                           ce->name, ce_namelen(ce), 0);
                if (old && ce->ce_mode == old->ce_mode &&
-                   !oidcmp(&ce->oid, &old->oid)) {
+                   oideq(&ce->oid, &old->oid)) {
                        discard_cache_entry(old);
                        continue; /* unchanged */
                }