git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/5] builtin-help: make it possible to exclude some commands in list_commands()

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2008, 19:46 UTC
Message-ID
<7vabg0eamk.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<5ad105819efb1c905bd01db3d08eb3422d283b3b.1217344803.git.vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> 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.

Previous: Junio C HamanoNext: Miklos Vajna
Message 8 of 9 in “Allow custom merge strategies, take 3”
  1. 0/5 Allow custom merge strategies, take 3Miklos Vajna, Jul 29, 2008
  2. 1/5 builtin-help: make is_git_command() usable outside builtin-helpMiklos Vajna, Jul 29, 2008
  3. 2/5 builtin-help: make list_commands() a bit more genericMiklos Vajna, Jul 29, 2008
  4. 3/5 builtin-help: make it possible to exclude some commands in list_commands()Miklos Vajna, Jul 29, 2008
  5. 4/5 builtin-merge: allow using a custom strategyMiklos Vajna, Jul 29, 2008
  6. 5/5 Add a new test for using a custom merge strategyMiklos Vajna, Jul 29, 2008
  7. Junio C HamanoJul 29, 2008
  8. Junio C HamanoJul 29, 2008
  9. 3/5 builtin-help: make it possible to exclude some commands in list_commands()Miklos Vajna, Jul 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.