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

Function strbuf_to_cone_pattern

builtin/sparse-checkout.c:558–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558static void strbuf_to_cone_pattern(struct strbuf *line, struct pattern_list *pl)
559{
560 strbuf_trim(line);
561
562 strbuf_trim_trailing_dir_sep(line);
563
564 if (strbuf_normalize_path(line))
565 die(_("could not normalize path %s"), line->buf);
566
567 if (!line->len)
568 return;
569
570 if (line->buf[0] != '/')
571 strbuf_insertstr(line, 0, "/");
572
573 insert_recursive_pattern(pl, line);
574}
575
576static void add_patterns_from_input(struct pattern_list *pl,
577 int argc, const char **argv,

Callers 1

add_patterns_from_inputFunction · 0.85

Calls 6

strbuf_trimFunction · 0.85
strbuf_normalize_pathFunction · 0.85
strbuf_insertstrFunction · 0.85
insert_recursive_patternFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected