grep: move logic to compile header pattern into a separate helper
[gitweb.git] / builtin / rerere.c
index 6d1b5802add040b7189630077c1bc10b82f76756..0c7202eb9e637b69bcbbf3641d8ed72f44fd7684 100644 (file)
@@ -70,7 +70,7 @@ static void garbage_collect(struct string_list *rr)
                        cutoff = cutoff_noresolve;
                }
                if (then < now - cutoff * 86400)
-                       string_list_append(e->d_name, &to_remove);
+                       string_list_append(&to_remove, e->d_name);
        }
        for (i = 0; i < to_remove.nr; i++)
                unlink_rr_item(to_remove.items[i].string);
@@ -146,7 +146,7 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
                        if (!has_rerere_resolution(name))
                                unlink_rr_item(name);
                }
-               unlink_or_warn(git_path("rr-cache/MERGE_RR"));
+               unlink_or_warn(git_path("MERGE_RR"));
        } else if (!strcmp(argv[1], "gc"))
                garbage_collect(&merge_rr);
        else if (!strcmp(argv[1], "status"))