MCPcopy Create free account
hub / github.com/git/git / list_commands

Function list_commands

help.c:334–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
335{
336 unsigned int colopts = 0;
337 repo_config(the_repository, get_colopts, &colopts);
338
339 if (main_cmds->cnt) {
340 const char *exec_path = git_exec_path();
341 printf_ln(_("available git commands in '%s'"), exec_path);
342 putchar('\n');
343 pretty_print_cmdnames(main_cmds, colopts);
344 putchar('\n');
345 }
346
347 if (other_cmds->cnt) {
348 puts(_("git commands available from elsewhere on your $PATH"));
349 putchar('\n');
350 pretty_print_cmdnames(other_cmds, colopts);
351 putchar('\n');
352 }
353}
354
355void list_common_cmds_help(void)
356{

Callers 1

cmd_helpFunction · 0.85

Calls 4

git_exec_pathFunction · 0.85
printf_lnFunction · 0.85
pretty_print_cmdnamesFunction · 0.85
repo_configFunction · 0.70

Tested by

no test coverage detected