Re: [PATCH 1/7] maintenance: optionally skip --auto process
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Aug 20, 2020, 12:12 UTC
- Message-ID
- <629e3f77-a80f-2014-1756-dec8d8647326@gmail.com>
- In-Reply-To
- <20200820020658.GA31084@danh.dev>
On 8/19/2020 10:06 PM, Đoàn Trần Công Danh wrote:
Show 16 quoted lines
> On 2020-08-19 17:16:42+0000, Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
>> From: Derrick Stolee <dstolee@microsoft.com>
>> @@ -1868,8 +1869,15 @@ int run_processes_parallel_tr2(int n, get_next_task_fn get_next_task,
>>
>> int run_auto_maintenance(int quiet)
>> {
>> + int enabled;
>> struct child_process maint = CHILD_PROCESS_INIT;
>>
>> + if (!git_config_get_bool("maintenance.auto", &enabled) &&
>> + !enabled) {
>> + fprintf(stderr, "enabled: %d\n", enabled);
>> + return 0;
>> + }
>
> Nit: This block of code is mis-indented (mixed space and tab).Thanks.
Show 7 quoted lines
> If we're running into inner block, "enabled" will always be "0" > We can just write: > > fprintf(stderr, "enabled: 0\n"); > > instead. Writing like that, we have one less thing to worry about > (whether "enabled" is initialised in git_config_get_bool or not).
Whoops! This fprintf shouldn't even be here, but got accidentally added during a debugging session. Thanks for noticing!
-Stolee