Show 33 quoted lines
> Hi Phillip,
>
> On Mon, 6 Nov 2017, Phillip Wood wrote:
>
>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>
>> Move the functions that check for empty messages from bulitin/commit.c
>> to sequencer.c so they can be shared with other commands. The
>> functions are refactored to take an explicit cleanup mode and template
>> filename passed by the caller.
>>
>> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> Good rationale. Just one thing:
>
>> diff --git a/sequencer.h b/sequencer.h
>> index 6f3d3df82c0ade64b7b125acd49bf3f5e15c53af..65a4b0c25185d7ad5115035abb766d1b95df9a62 100644
>> --- a/sequencer.h
>> +++ b/sequencer.h
>> @@ -58,4 +58,14 @@ extern const char sign_off_header[];
>> void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
>> void append_conflicts_hint(struct strbuf *msgbuf);
>>
>> +enum cleanup_mode {
>> + CLEANUP_SPACE,
>> + CLEANUP_NONE,
>> + CLEANUP_SCISSORS,
>> + CLEANUP_ALL
>> +};
>
> When it was file-local, `cleanup_mode` was okay (although far from great).
> Now that we want to make it more widely available, I fear we have to make
> the name much longer, e.g. `commit_msg_cleanup_mode`.