"John Cai via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: John Cai <johncai86@xxxxxxxxx> > > A subsequent commit will need the ability to tell if the diff algorithm > was set through the command line through setting a new member of > diff_options. While this logic can be added to the > diff_opt_diff_algorithm() callback, the `--minimal` and `--histogram` > options are handled via OPT_BIT without a callback. > > Remedy this by consolidating the options parsing logic for --minimal and > --histogram into one callback. This way we can modify `diff_options` in > that function. > > As an additional refactor, the logic that sets the diff algorithm in > diff_opt_diff_algorithm() can be refactored into a helper that will > allow multiple callsites to set the diff algorithm. > > Signed-off-by: John Cai <johncai86@xxxxxxxxx> > --- > diff.c | 57 +++++++++++++++++++++++++++++++++++++++++++-------------- > 1 file changed, 43 insertions(+), 14 deletions(-) Nicely done. Much easier to follow. Will queue. Thanks.