From: Đoàn Trần Công Danh Date: Thu, 20 Aug 2020 02:06:58 GMT Subject: Re: [PATCH 1/7] maintenance: optionally skip --auto process Message-ID: <20200820020658.GA31084@danh.dev> In-Reply-To: <90de25d1287595fdedc9dcd194a2e0ac120d4aad.1597857409.git.gitgitgadget@gmail.com> On 2020-08-19 17:16:42+0000, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > @@ -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). 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). -- Danh