Re: [PATCH 6/7] merge-ort: upon merge abort, only show messages causing the abort
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 14, 2024, 04:19 UTC
- Message-ID
- <CAPig+cSZPC=41w8kG6n5hdSCUC4+jYJ6cM8UC-WCO3Bcmb2iNA@mail.gmail.com>
- In-Reply-To
- <71391b18c1a711fee1f5aff6eedbd3f631d37ded.1718310307.git.gitgitgadget@gmail.com>
On Thu, Jun 13, 2024 at 4:25 PM Elijah Newren via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 18 quoted lines
> When something goes wrong enough that we need to abort early and not
> even attempt merging the remaining files, it probably does not make
> sense to report conflicts messages for the subset of files we processed
> before hitting the fatal error. Instead, only show the messages
> associated with paths where we hit the fatal error. Also, print these
> messages to stderr rather than stdout.
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
> diff --git a/merge-ort.c b/merge-ort.c
> @@ -543,10 +543,24 @@ enum conflict_and_info_types {
> - CONFLICT_SUBMODULE_CORRUPT,
> +
> + /* INSERT NEW ENTRIES HERE */
> + /*
> + * Something is seriously wrong; cannot even perform merge;
> + * Keep this group _last_ other than NB_CONFLICT_TYPES
> + */I'm probably missing something obvious, but here the new comment talks about NB_CONFLICT_TYPES...
Show 5 quoted lines
> + ERROR_SUBMODULE_CORRUPT, > > /* Keep this entry _last_ in the list */ > - NB_CONFLICT_TYPES, > + NB_TOTAL_TYPES,
... but NB_CONFLICT_TYPES gets removed here.
Show 6 quoted lines
> @@ -1828,9 +1845,9 @@ static int merge_submodule(struct merge_options *opt,
> - _("Failed to merge submodule %s "
> + _("error: failed to merge submodule %s "
> @@ -1848,7 +1865,7 @@ static int merge_submodule(struct merge_options *opt,
> _("Failed to merge submodule %s "
> "(repository corrupt)"),Do you also want to apply the same "error: failed..." transformation to this error message as you did to other error messages?