From: Junio C Hamano Date: Fri, 24 Jul 2020 19:50:28 GMT Subject: Re: [PATCH v2 06/18] maintenance: add --task option Message-ID: In-Reply-To: <2c5e5ed3-155e-f963-02c8-2789c799f3f7@gmail.com> Derrick Stolee writes: >>> for (i = 0; !result && i < num_tasks; i++) { >>> - if (!tasks[i]->enabled) >>> + if (opts.tasks_selected && !tasks[i]->selected) >>> + continue; >>> + >>> + if (!opts.tasks_selected && !tasks[i]->enabled) >>> continue; >> >> I am not sure about this. Even if the task is disabled, if the >> user says --task=, it is run anyway? Doesn't make an immediate >> sense to me. >> ... >> if (!tasks[i]->enabled || >> !(!opts.tasks_selected || tasks[i]->selected)) >> continue; > > This isn't quite right, due to the confusing nature of "enabled". Yes, in the message you are responding to, I was still assuming that --task=foo that defeat task.foo.enabled=no would be a bug. If we want to run disabled tasks by selection, of course the condition would need to change.