read-cache: be specific what part of the index has changed
[gitweb.git] / rerere.c
index 34a21c431bef5c5915be77a2a0a2b8fc238bd6ac..ffc6a5b168304726b5fe326211f26dafa460c7fa 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -492,8 +492,7 @@ static int update_paths(struct string_list *update)
        }
 
        if (!status && active_cache_changed) {
-               if (write_cache(fd, active_cache, active_nr) ||
-                   commit_locked_index(&index_lock))
+               if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
                        die("Unable to write new index file");
        } else if (fd >= 0)
                rollback_lock_file(&index_lock);
@@ -673,7 +672,7 @@ int rerere_forget(struct pathspec *pathspec)
        for (i = 0; i < conflict.nr; i++) {
                struct string_list_item *it = &conflict.items[i];
                if (!match_pathspec(pathspec, it->string,
-                                   strlen(it->string), 0, NULL))
+                                   strlen(it->string), 0, NULL, 0))
                        continue;
                rerere_forget_one_path(it->string, &merge_rr);
        }