Web lists-archives.com

Re: [PATCH 4/5] rebase -i: learn to abbreviate command names




Liam Beguin <liambeguin@xxxxxxxxx> writes:

>  	if (command == MAKE_SCRIPT && argc > 1)
> -		return !!sequencer_make_script(keep_empty, stdout, argc, argv);
> +		return !!sequencer_make_script(keep_empty, abbreviate_commands,
> +					       stdout, argc, argv);

This suggests that a preliminary clean-up to update the parameter
list of sequencer_make_script() is in order just before this step.
How about making it like so, perhaps:

    int sequencer_make_script(FILE *out, int ac, char **av, unsigned flags)

where keep_empty becomes just one bit in that flags word.  Then another
bit in the same flags word can be used for this option.

Otherwise, every time somebody comes up with a new and shiny feature
for the function, we'd end up adding more to its parameter list.