Re: [PATCH v2 1/2] diff: consolidate diff algorithm option parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 15, 2023, 23:42 UTC
- Message-ID
- <xmqqmt5ev6ln.fsf@gitster.g>
- In-Reply-To
- <AAC53EE0-91F5-4A74-AB26-5F3F8B680CDE@gmail.com>
John Cai <johncai86@gmail.com> writes:
> Yeah, it's not great to pull things out from a bit flip to a callback but I > needed some way of setting the xdl_opts_command_line member in the next commit
If that is the case (and after reading [2/2], of course, readers of the series can tell that it was the reason), it would be good to be honest and document _that_ as the reason why you are using callbacks for all of them in the proposed log message for [1/2].
And I think that is a reasonable way to use callback to do "more than just setting a bit". Even in that case, I am not sure if it is a good idea to share the same callback that has conditional code that only is relevant to the "patience" case, though.
THanks.