Thread (1 message) 1 message, 1 author, 2024-03-08

Re: [PATCH 4/4] checkout: cleanup --conflict=<style> parsing

From: Junio C Hamano <hidden>
Date: 2024-03-08 21:40:44

phillip.wood123@gmail.com writes:
Hi Junio

On 08/03/2024 16:15, Junio C Hamano wrote:
quoted
"Phillip Wood via GitGitGadget" [off-list ref] writes:
We could use OPT_CALLBACK() to accept the incoming string, parse it
and store it in opts->conflict_style and that would be a way to
avoid the extra member.
quoted
+		opts->conflict_style =
+			parse_conflict_style(opts->conflict_style_name);
When I saw the change to xdiff-interface in an earlier step, I
thought parse_conflict_style() was a potentially confusing name.
You can imagine a function that is fed a file with conflict markers
and say "ah, this uses diff3 style with common ancestor version" vs
"this uses merge style with only two sides" to have such a name.
parse_conflict_style_name() that takes a name and returns
conflict_style enumeration constant would not risk such a confusion,
I guess.
Those are both good suggestions - I'll re-roll next week
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help