Re: [PATCH v2 03/18] maintenance: replace run_auto_gc()

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

 



On 7/30/2020 9:29 AM, Derrick Stolee wrote:
> On 7/23/2020 4:21 PM, Junio C Hamano wrote:
>> Don't we want to replace all _gc_ with _maintenance_ in this
>> function?  I think the first business before we can do so would be
>> to rethink if spelling out "maintenance" fully in code is a good
>> idea in the first space.  It would make names for variables,
>> structures and fields unnecessarily long without contributing to
>> ease of understanding an iota, and a easy-to-remember short-form or
>> an abbreviation may be needed.  Using a short-form/abbreviation
>> wouldn't worsen the end-user experience, and not the developer
>> experience for that matter.
>>
>> If we choose "gc" as the short-hand, most of the change in this step
>> would become unnecessary.  I also do not mind if we some other words
>> or word-fragment (perhaps "maint"???) is chosen.
> 
> Yes, I should have noticed that. Also, with Peff's feedback from
> another thread, the method can look a bit simpler this way:

It would help if I actually _compile_ code before sending it.
Here is the fixed version:

int run_auto_maintenance(int quiet)
{
	struct child_process maint = CHILD_PROCESS_INIT;
	maint.git_cmd = 1;

	argv_array_pushl(&maint.args, "maintenance", "run", "--auto", NULL);
	if (quiet)
		argv_array_push(&maint.args, "--quiet");
	else
		argv_array_push(&maint.args, "--no-quiet");

	return run_command(&maint);
}




[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