Re: [PATCH v2 3/4] add-patch: respect diff.context configuration

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

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

> On 13/05/2025 16:47, Junio C Hamano wrote:
>> Phillip Wood <phillip.wood123@xxxxxxxxx> writes:
>>> On 10/05/2025 14:46, Leon Michalak via GitGitGadget wrote:
>>>
>>>> @@ -78,6 +82,19 @@ void init_add_i_state(struct add_i_state *s, struct repository *r)
>>>>    	repo_config_get_string(r, "diff.algorithm",
>>>>    			       &s->interactive_diff_algorithm);
>>>>    +	if (!repo_config_get_int(r, "diff.context", &context)) {
>>>> +		if (context < 0)
>>>> +			die(_("%s cannot be negative"), "diff.context");
>>>> +		else
>>>> +			s->context = context;
>>>> +	};
>>>> +	if (!repo_config_get_int(r, "diff.interHunkContext", &interhunkcontext)) {
>>>> +		if (interhunkcontext < 0)
>>>> +			die(_("%s cannot be negative"), "diff.interHunkContext");
>>>> +		else
>>>> +			s->interhunkcontext = interhunkcontext;
>>>> +	};
>>>
>>> Thanks for changing this. This iteration of the code changes looks good
>> Lose the ';' (semicolon) after closing {brace}s.
>> This is C; you do not need an empty statement after a {block}.
>
> Oh well spotted, I'd missed that

Heh, with enough number of eyeballs, all the bugs are shallow.




[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