read-cache: be specific what part of the index has changed
[gitweb.git] / rerere.c
index 1f2d21a72f56a68a7f9307bfd9092087687cffae..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);
@@ -672,8 +671,8 @@ int rerere_forget(struct pathspec *pathspec)
        find_conflict(&conflict);
        for (i = 0; i < conflict.nr; i++) {
                struct string_list_item *it = &conflict.items[i];
-               if (!match_pathspec_depth(pathspec, it->string, strlen(it->string),
-                                         0, NULL))
+               if (!match_pathspec(pathspec, it->string,
+                                   strlen(it->string), 0, NULL, 0))
                        continue;
                rerere_forget_one_path(it->string, &merge_rr);
        }