diff options
Diffstat (limited to 'rerere.c')
-rw-r--r-- | rerere.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -525,7 +525,7 @@ static int is_rerere_enabled(void) return 1; } -int setup_rerere(struct string_list *merge_rr) +int setup_rerere(struct string_list *merge_rr, int flags) { int fd; @@ -533,6 +533,8 @@ int setup_rerere(struct string_list *merge_rr) if (!is_rerere_enabled()) return -1; + if (flags & (RERERE_AUTOUPDATE|RERERE_NOAUTOUPDATE)) + rerere_autoupdate = !!(flags & RERERE_AUTOUPDATE); merge_rr_path = git_pathdup("MERGE_RR"); fd = hold_lock_file_for_update(&write_lock, merge_rr_path, LOCK_DIE_ON_ERROR); @@ -540,12 +542,12 @@ int setup_rerere(struct string_list *merge_rr) return fd; } -int rerere(void) +int rerere(int flags) { struct string_list merge_rr = { NULL, 0, 0, 1 }; int fd; - fd = setup_rerere(&merge_rr); + fd = setup_rerere(&merge_rr, flags); if (fd < 0) return 0; return do_plain_rerere(&merge_rr, fd); @@ -586,7 +588,7 @@ int rerere_forget(const char **pathspec) if (read_cache() < 0) return error("Could not read index"); - fd = setup_rerere(&merge_rr); + fd = setup_rerere(&merge_rr, RERERE_NOAUTOUPDATE); unmerge_cache(pathspec); find_conflict(&conflict); |