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

Function is_alias

parse-options.c:471–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471static int is_alias(struct parse_opt_ctx_t *ctx,
472 const struct option *one_opt,
473 const struct option *another_opt)
474{
475 const char **group;
476
477 if (!ctx->alias_groups)
478 return 0;
479
480 if (!one_opt->long_name || !another_opt->long_name)
481 return 0;
482
483 for (group = ctx->alias_groups; *group; group += 3) {
484 /* it and other are from the same family? */
485 if (has_string(one_opt->long_name, group) &&
486 has_string(another_opt->long_name, group))
487 return 1;
488 }
489 return 0;
490}
491
492struct parsed_option {
493 const struct option *option;

Callers 1

register_abbrevFunction · 0.85

Calls 1

has_stringFunction · 0.85

Tested by

no test coverage detected