Re: [PATCH 3/9] merge-ort: capture and print ll-merge warnings in our preferred fashion
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 22, 2021, 00:00 UTC
- Message-ID
- <xmqq5yrho6f3.fsf@gitster.g>
- In-Reply-To
- <f36395fdee044a077a640bd3031a7a8da8a39657.1640109948.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 11 quoted lines
> From: Elijah Newren <newren@gmail.com> > > Instead of immediately printing ll-merge warnings to stderr, we save > them in our output strbuf. Besides allowing us to move these warnings > to a special file for --remerge-diff, this has two other benefits for > regular merges done by merge-ort: > > * The deferral of messages ensures we can print all messages about > any given path together (merge-recursive was known to sometimes > intersperse messages about other paths, particularly when renames > were involved).
I would imagine that with something like this, we can show such a warning message differently when it happens during an inner "synthesizing a virtual common ancestor" merge (the most likely value for "show differently" would be to "squelch"), which may be a good thing.
Show 7 quoted lines
> if (merge_status == LL_MERGE_BINARY_CONFLICT)
> - warning("Cannot merge binary files: %s (%s vs. %s)",
> - path, name1, name2);
> + path_msg(opt, path, 0,
> + "warning: Cannot merge binary files: %s (%s vs. %s)",
> + path, name1, name2);
> Nice.