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

Function show_usage_with_options_if_asked

parse-options.c:1490–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1488}
1489
1490void show_usage_with_options_if_asked(int ac, const char **av,
1491 const char * const *usagestr,
1492 const struct option *opts)
1493{
1494 if (ac == 2) {
1495 if (!strcmp(av[1], "-h")) {
1496 usage_with_options_internal(NULL, usagestr, opts,
1497 USAGE_NORMAL, USAGE_TO_STDOUT);
1498 exit(129);
1499 } else if (!strcmp(av[1], "--help-all")) {
1500 usage_with_options_internal(NULL, usagestr, opts,
1501 USAGE_FULL, USAGE_TO_STDOUT);
1502 exit(129);
1503 }
1504 }
1505}
1506
1507void NORETURN usage_msg_opt(const char *msg,
1508 const char * const *usagestr,

Callers 15

cmd__simple_ipcFunction · 0.85
cmd_amFunction · 0.85
cmd_commit_treeFunction · 0.85
cmd_rebaseFunction · 0.85
cmd_ls_filesFunction · 0.85
cmd_mergeFunction · 0.85
cmd_checkout_indexFunction · 0.85
cmd_gcFunction · 0.85
cmd_checkout__workerFunction · 0.85
cmd_statusFunction · 0.85
cmd_commitFunction · 0.85
cmd_backfillFunction · 0.85

Calls 1

Tested by 1

cmd__simple_ipcFunction · 0.68