From 6054d1aac36d5769461fb73b15326a900e53edb9 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Wed, 2 Feb 2022 02:37:33 +0000 Subject: merge-ort: format messages slightly different for use in headers When users run git show --remerge-diff $MERGE_COMMIT or git log -p --remerge-diff ... stdout is not an appropriate location to dump conflict messages, but we do want to provide them to users. We will include them in the diff headers instead...but for that to work, we need for any multiline messages to replace newlines with both a newline and a space. Add a new flag to signal when we want these messages modified in such a fashion, and use it in path_msg() to modify these messages this way. Also, allow a special prefix to be specified for these headers. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- merge-recursive.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'merge-recursive.h') diff --git a/merge-recursive.h b/merge-recursive.h index 0795a1d3ec..b88000e3c2 100644 --- a/merge-recursive.h +++ b/merge-recursive.h @@ -46,6 +46,8 @@ struct merge_options { /* miscellaneous control options */ const char *subtree_shift; unsigned renormalize : 1; + unsigned record_conflict_msgs_as_headers : 1; + const char *msg_header_prefix; /* internal fields used by the implementation */ struct merge_options_internal *priv; -- cgit v1.2.3