summaryrefslogtreecommitdiff
path: root/diff-merges.c
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2021-04-13 11:41:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-17 06:38:35 (GMT)
commit17c13e60fd799336b28d320dcba06fe1ef06e01d (patch)
tree06050127b529d7308656ae8a218c3e7c9db5d431 /diff-merges.c
parent38fc4dbbc2f110192752a3b2c99abb745f0494bf (diff)
downloadgit-17c13e60fd799336b28d320dcba06fe1ef06e01d.zip
git-17c13e60fd799336b28d320dcba06fe1ef06e01d.tar.gz
git-17c13e60fd799336b28d320dcba06fe1ef06e01d.tar.bz2
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 <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-merges.c')
-rw-r--r--diff-merges.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/diff-merges.c b/diff-merges.c
index 9d19225..f3a9dae 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;