Re: [PATCH V2 1/3] strbuf: add tests

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

 



Hi William,

On Mon, 6 Jun 2016, William Duclot wrote:

> +	enum {
> +		MODE_UNSPECIFIED = 0,
> +		MODE_BASIC_GROW ,
> +		MODE_STRBUF_CHECK,
> +		MODE_GROW_OVERFLOW
> +	} cmdmode = MODE_UNSPECIFIED;
> +	struct option options[] = {
> +		OPT_CMDMODE(0, "basic_grow", &cmdmode,
> +			    N_(" basic grow test"),
> +			    MODE_BASIC_GROW),
> +		OPT_CMDMODE(0, "strbuf_check_behavior", &cmdmode,
> +			    N_("check the strbuf's behavior"),
> +			    MODE_STRBUF_CHECK),
> +		OPT_CMDMODE(0, "grow_overflow", &cmdmode,
> +			    N_("test grow expecting overflow"),
> +			    MODE_GROW_OVERFLOW),
> +		OPT_END()

I found it to be really helpful to keep as much consistency as possible
(Git's source code is complicated enough, no need to make it even more
complicated).

In this particular instance, I would suggest to rename either
MODE_STRBUF_CHECK or strbuf_check_behavior to match the other one.

Ciao,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]