summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-04 00:20:48 -0800
committerJunio C Hamano <gitster@pobox.com>2009-12-04 00:20:48 -0800
commitcb6020bb017405cc3e7f1faea6f30d4fd1b62e70 (patch)
treee03a7afb1884d2b4f8f1e45ee6a945baebd95806 /parse-options.c
parent1a56be134f9477296a7ade040e8b802bf3a643a1 (diff)
downloadgit-cb6020bb017405cc3e7f1faea6f30d4fd1b62e70.tar.gz
Teach --[no-]rerere-autoupdate option to merge, revert and friends
Introduce a command line option to override rerere.autoupdate configuration variable to make it more useful. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse-options.c b/parse-options.c
index f5594114ed..10ec21fb89 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -633,3 +633,10 @@ int parse_opt_with_commit(const struct option *opt, const char *arg, int unset)
commit_list_insert(commit, opt->value);
return 0;
}
+
+int parse_opt_tertiary(const struct option *opt, const char *arg, int unset)
+{
+ int *target = opt->value;
+ *target = unset ? 2 : 1;
+ return 0;
+}