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

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

>> -	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);
>>  	validate_cache_entries(repo->index);
>
> Should we really pass `repo` unconditionally when `RUN_SETUP_GENTLY` was
> requested? I'd think that we should rather pass `NULL` if we didn't find
> a repository in that case. So this condition should likely be made
> conditional, shouldn't it?

Yeah, that is much much more preferrable than my earlier suggestion
to pass yet another Boolean parameter to p->fn().

> There's also a missing space between the closing brace and the ternary
> questionmark.

True, too.




[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