summaryrefslogtreecommitdiffstats
path: root/rerere.c
diff options
context:
space:
mode:
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/rerere.c b/rerere.c
index 3a3888cce2..d01e98bf65 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1107,7 +1107,7 @@ fail_exit:
int rerere_forget(struct repository *r, struct pathspec *pathspec)
{
- int i, fd;
+ int i, fd, ret;
struct string_list conflict = STRING_LIST_INIT_DUP;
struct string_list merge_rr = STRING_LIST_INIT_DUP;
@@ -1132,7 +1132,12 @@ int rerere_forget(struct repository *r, struct pathspec *pathspec)
continue;
rerere_forget_one_path(r->index, it->string, &merge_rr);
}
- return write_rr(&merge_rr, fd);
+
+ ret = write_rr(&merge_rr, fd);
+
+ string_list_clear(&conflict, 0);
+ string_list_clear(&merge_rr, 1);
+ return ret;
}
/*
@@ -1203,8 +1208,10 @@ void rerere_gc(struct repository *r, struct string_list *rr)
if (setup_rerere(r, rr, 0) < 0)
return;
- git_config_get_expiry_in_days("gc.rerereresolved", &cutoff_resolve, now);
- git_config_get_expiry_in_days("gc.rerereunresolved", &cutoff_noresolve, now);
+ repo_config_get_expiry_in_days(the_repository, "gc.rerereresolved",
+ &cutoff_resolve, now);
+ repo_config_get_expiry_in_days(the_repository, "gc.rerereunresolved",
+ &cutoff_noresolve, now);
git_config(git_default_config, NULL);
dir = opendir(git_path("rr-cache"));
if (!dir)