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

Function parse_element_magic

pathspec.c:430–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430static const char *parse_element_magic(unsigned *magic, int *prefix_len,
431 struct pathspec_item *item,
432 const char *elem)
433{
434 if (elem[0] != ':' || get_literal_global())
435 return elem; /* nothing to do */
436 else if (elem[1] == '(')
437 /* longhand */
438 return parse_long_magic(magic, prefix_len, item, elem);
439 else
440 /* shorthand */
441 return parse_short_magic(magic, elem);
442}
443
444/*
445 * Perform the initialization of a pathspec_item based on a pathspec element.

Callers 1

init_pathspec_itemFunction · 0.85

Calls 3

get_literal_globalFunction · 0.85
parse_long_magicFunction · 0.85
parse_short_magicFunction · 0.85

Tested by

no test coverage detected