diff options
author | Elijah Newren <newren@gmail.com> | 2022-06-18 03:20:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-23 02:10:06 +0300 |
commit | de90581141a886a79cccd0d9adb76814f3e1ab2c (patch) | |
tree | 78f5313b9c5c1bd2afb3da9c1a334e54059b6dea /builtin/merge-tree.c | |
parent | cb2607759e27627aca614726dc50e98ac0ba6d19 (diff) |
merge-ort: optionally produce machine-readable output
With the new `detailed` parameter, a new mode can be triggered when
displaying the merge messages: The `detailed` mode prints NUL-delimited
fields of the following form:
<path-count> NUL <path>... NUL <conflict-type> NUL <message>
The `<path-count>` field determines how many `<path>` fields there are.
The intention of this mode is to support server-side operations, where
worktree-less merges can lead to conflicts and depending on the type
and/or path count, the caller might know how to handle said conflict.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-tree.c')
-rw-r--r-- | builtin/merge-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index c61b5b4a10..b3c5692498 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -468,7 +468,8 @@ static int real_merge(struct merge_tree_options *o, } if (o->show_messages) { putchar(line_termination); - merge_display_update_messages(&opt, &result); + merge_display_update_messages(&opt, line_termination == '\0', + &result); } merge_finalize(&opt, &result); return !result.clean; /* result.clean < 0 handled above */ |