read-cache: new API write_locked_index instead of write_index/write_cache
[gitweb.git] / builtin / update-index.c
index ba54e19cd559018fcca52b5251bffa78165e16a3..42cbe4ba1e4d1553934f13a06bf76156c078c6f0 100644 (file)
@@ -921,8 +921,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                                exit(128);
                        unable_to_lock_index_die(get_index_file(), lock_error);
                }
-               if (write_cache(newfd, active_cache, active_nr) ||
-                   commit_locked_index(lock_file))
+               if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
                        die("Unable to write new index file");
        }