summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 18:13:01 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 18:13:01 -0800
commit4a88fb7ffc32bdfdfab2605430514d92aba25b8a (patch)
tree77d37de207313b760eb08c502be1ea98a18351e9 /rerere.c
parentMerge branch 'pc/uninteresting-submodule-disappear-upon-switch-branches' (diff)
parentTeach --[no-]rerere-autoupdate option to merge, revert and friends (diff)
downloadtgif-4a88fb7ffc32bdfdfab2605430514d92aba25b8a.tar.xz
Merge branch 'jc/rerere'
* jc/rerere: Teach --[no-]rerere-autoupdate option to merge, revert and friends
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rerere.c b/rerere.c
index 29f95f657d..e0ac5bcaed 100644
--- a/rerere.c
+++ b/rerere.c
@@ -367,7 +367,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;
@@ -375,6 +375,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);
@@ -382,12 +384,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);