Re: [PATCH 1/4] git: pass in repo for RUN_SETUP_GENTLY

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

 



shejialuo <shejialuo@xxxxxxxxx> writes:

> On Tue, Sep 24, 2024 at 01:42:41PM +0000, John Cai via GitGitGadget wrote:
>
> [snip]
>
>> diff --git a/git.c b/git.c
>> index 2fbea24ec92..e31b52dcc50 100644
>> --- a/git.c
>> +++ b/git.c
>> @@ -480,7 +480,10 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv, struct
>>  	trace2_cmd_name(p->cmd);
>
> This line is a little long, we may clean this in this patch.
>
>>  
>>  	validate_cache_entries(repo->index);
>> -	status = p->fn(argc, argv, prefix, (p->option & RUN_SETUP)? repo : NULL);
>> +	status = p->fn(argc,
>> +		       argv,
>> +		       prefix,
>> +		       ((p->option & RUN_SETUP) || (p->option & RUN_SETUP_GENTLY))? repo : NULL);
>
> This reads so strange, could we create a new variable here?
>
> Small problems, don't worth a reroll.

If it is so annoying to make your reading hiccup, it is not small at
all.  One argument per line is so strange, and one plausible fix
would be

	status = p->fn(argc, argv, prefix,
        	       (p->option & (RUN_SETUP|RUN_SETUP_GENTLY))
		       ? repo : NULL);

Thanks.




[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