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

Function expand_ref_prefix

refs.c:658–665  ·  view source on GitHub ↗

* Given a 'prefix' expand it by the rules in 'ref_rev_parse_rules' and add * the results to 'prefixes' */

Source from the content-addressed store, hash-verified

656 * the results to 'prefixes'
657 */
658void expand_ref_prefix(struct strvec *prefixes, const char *prefix)
659{
660 const char **p;
661 int len = strlen(prefix);
662
663 for (p = ref_rev_parse_rules; *p; p++)
664 strvec_pushf(prefixes, *p, len, prefix);
665}
666
667#ifndef WITH_BREAKING_CHANGES
668static const char default_branch_name_advice[] = N_(

Callers 2

refspec_ref_prefixesFunction · 0.85
cmd_cloneFunction · 0.85

Calls 1

strvec_pushfFunction · 0.85

Tested by 1

refspec_ref_prefixesFunction · 0.68