From 17c13e60fd799336b28d320dcba06fe1ef06e01d Mon Sep 17 00:00:00 2001 From: Sergey Organov Date: Tue, 13 Apr 2021 14:41:17 +0300 Subject: diff-merges: introduce log.diffMerges config variable New log.diffMerges configuration variable sets the format that --diff-merges=on will be using. The default is "separate". t4013: add the following tests for log.diffMerges config: * Test that wrong values are denied. * Test that the value of log.diffMerges properly affects both --diff-merges=on and -m. t9902: fix completion tests for log.d* to match log.diffMerges. Added documentation for log.diffMerges. Signed-off-by: Sergey Organov Signed-off-by: Junio C Hamano --- diff-merges.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'diff-merges.c') diff --git a/diff-merges.c b/diff-merges.c index 9d19225b3e..f3a9daed7e 100644 --- a/diff-merges.c +++ b/diff-merges.c @@ -90,6 +90,17 @@ static void set_diff_merges(struct rev_info *revs, const char *optarg) * Public functions. They are in the order they are called. */ +int diff_merges_config(const char *value) +{ + diff_merges_setup_func_t func = func_by_opt(value); + + if (!func) + return -1; + + set_to_default = func; + return 0; +} + int diff_merges_parse_opts(struct rev_info *revs, const char **argv) { int argcount = 1; -- cgit v1.2.3