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

Function write_patterns_to_file

builtin/sparse-checkout.c:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29};
30
31static void write_patterns_to_file(FILE *fp, struct pattern_list *pl)
32{
33 int i;
34
35 for (i = 0; i < pl->nr; i++) {
36 struct path_pattern *p = pl->patterns[i];
37
38 if (p->flags & PATTERN_FLAG_NEGATIVE)
39 fprintf(fp, "!");
40
41 fprintf(fp, "%s", p->pattern);
42
43 if (p->flags & PATTERN_FLAG_MUSTBEDIR)
44 fprintf(fp, "/");
45
46 fprintf(fp, "\n");
47 }
48}
49
50static char const * const builtin_sparse_checkout_list_usage[] = {
51 "git sparse-checkout list",

Callers 2

sparse_checkout_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected