Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2022-02-02 05:37:33 +0300
committerJunio C Hamano <gitster@pobox.com>2022-02-02 21:02:27 +0300
commit6054d1aac36d5769461fb73b15326a900e53edb9 (patch)
treef013c7245bdb44814a3a56de132413f46fa12724 /merge-recursive.c
parenta28d094ac276da2f6dd8132355baaedf685342ef (diff)
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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index bc73c52dd8..9ec1e6d043 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -3714,6 +3714,10 @@ static int merge_start(struct merge_options *opt, struct tree *head)
assert(opt->priv == NULL);
+ /* Not supported; option specific to merge-ort */
+ assert(!opt->record_conflict_msgs_as_headers);
+ assert(!opt->msg_header_prefix);
+
/* Sanity check on repo state; index must match head */
if (repo_index_has_changes(opt->repo, head, &sb)) {
err(opt, _("Your local changes to the following files would be overwritten by merge:\n %s"),