MCPcopy Index your code
hub / github.com/git/git / pretty_print_cmdnames

Function pretty_print_cmdnames

help.c:229–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static void pretty_print_cmdnames(struct cmdnames *cmds, unsigned int colopts)
230{
231 struct string_list list = STRING_LIST_INIT_NODUP;
232 struct column_options copts;
233 int i;
234
235 for (i = 0; i < cmds->cnt; i++)
236 string_list_append(&list, cmds->names[i]->name);
237 /*
238 * always enable column display, we only consult column.*
239 * about layout strategy and stuff
240 */
241 colopts = (colopts & ~COL_ENABLE_MASK) | COL_ENABLED;
242 memset(&copts, 0, sizeof(copts));
243 copts.indent = " ";
244 copts.padding = 2;
245 print_columns(&list, colopts, &copts);
246 string_list_clear(&list, 0);
247}
248
249static void list_commands_in_dir(struct cmdnames *cmds,
250 const char *path,

Callers 1

list_commandsFunction · 0.85

Calls 3

print_columnsFunction · 0.85
string_list_clearFunction · 0.85
string_list_appendFunction · 0.70

Tested by

no test coverage detected