Web lists-archives.com

Re: [PATCH v2 2/9] commit: move empty message checks to libgit




On 10/11/17 18:51, Ramsay Jones wrote:
> 
> 
> On 10/11/17 11:09, Phillip Wood wrote:
>> From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
>>
>> 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@xxxxxxxxxxxxx>
>> ---
>>
>> Notes:
>>     changes since v1:
>>      - prefix cleanup_mode enum and constants with commit_msg_
>>
>>  builtin/commit.c | 99 +++++++++++---------------------------------------------
>>  sequencer.c      | 61 ++++++++++++++++++++++++++++++++++
>>  sequencer.h      | 11 +++++++
>>  3 files changed, 91 insertions(+), 80 deletions(-)
>>
> 
> Just an idle thought - why are these functions moving to
> sequencer.[ch] rather than commit[.ch]?
> 
> Similar comments for other patches in the series which moves
> code from builtin/commit.c to sequencer.[ch].

I did think about putting them in commit.[ch] but I felt they where
higher level than the existing functions in those files and as they're
used by the sequencer code I just put them in there in the end.

Best Wishes

Phillip

> ATB,
> Ramsay Jones
> 
>