Re: [PATCH v7 7/8] sequencer.c: define get_config_from_cleanup

2019-03-11 Thread Junio C Hamano
Denton Liu writes: > +struct cleanup_config_mapping { > +const char *config_value; > +enum commit_msg_cleanup_mode editor_cleanup; > +enum commit_msg_cleanup_mode no_editor_cleanup; > +}; Is this code using 4-space indent? Please don't. Also, I found that Eric's comment on naming g

Re: [PATCH v7 7/8] sequencer.c: define get_config_from_cleanup

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 11:42 PM Denton Liu wrote: > Define a function which allows us to get the string configuration value > of a enum commit_msg_cleanup_mode. This is done by refactoring > get_cleanup_mode such that it uses a lookup table to find the mappings > between string and enum and then

[PATCH v7 7/8] sequencer.c: define get_config_from_cleanup

2019-03-10 Thread Denton Liu
Define a function which allows us to get the string configuration value of a enum commit_msg_cleanup_mode. This is done by refactoring get_cleanup_mode such that it uses a lookup table to find the mappings between string and enum and then using the same LUT in reverse to define get_config_from_clea