Thread (1 message) 1 message, 1 author, 2020-07-24

Re: [PATCH v2 06/18] maintenance: add --task option

From: Junio C Hamano <hidden>
Date: 2020-07-24 19:50:36

Derrick Stolee [off-list ref] writes:
quoted
quoted
 	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 <x> is disabled, if the
user says --task=<x>, 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help