From: Junio C Hamano Date: Tue, 29 Jul 2008 19:46:59 GMT Subject: Re: [PATCH 3/5] builtin-help: make it possible to exclude some commands in list_commands() Message-ID: <7vabg0eamk.fsf@gitster.siamese.dyndns.org> In-Reply-To: <5ad105819efb1c905bd01db3d08eb3422d283b3b.1217344803.git.vmiklos@frugalware.org> Miklos Vajna writes: > The supposed method is to build a list of commands to be excluded using > add_cmdname(), then pass the list as the new exclude parameter. If no > exclude is needed, NULL should be used. You require that exclude is a sorted list; this should be documented somewhere to avoid future misuses. There is no need for adding extra qsort() anywhere in the patchset because the only user you are adding is in the next patch that sends a subset of the commands in main_cmds in the order they are found in the list, and main_cmds is already sorted.