Re: [PATCH v1 1/8] commit: move empty message checks to libgit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/11/17 00:43, Johannes Schindelin wrote:
> Hi Phillip,
> 
> On Mon, 6 Nov 2017, 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>
> 
> 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`.

That's certainly less ambiguous! I'll bite the bullet and extend the name.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux