MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / gic_depth_case

Function gic_depth_case

tests/test_gitignore_checked.c:550–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550static bool gic_depth_case(unsigned depth, bool earlier) {
551 cbm_ignore_checked_limits_t limits = gic_limits();
552 limits.max_depth = depth;
553 cbm_ignore_checked_t *owner = NULL;
554 const cbm_ignore_program_t *program = NULL;
555 const char *rules = earlier ? "a\n!*a" : "*a";
556 bool ok = gic_open(&owner, &limits) &&
557 gic_parse(owner, rules, strlen(rules), earlier ? 2 : 1, &program);
558 if (ok && depth == 1)
559 ok = gic_match_limit(owner, program, "a", CBM_IGNORE_CAP_DEPTH);
560 else if (ok)
561 ok = gic_match(owner, program, "a", false,
562 earlier ? CBM_IGNORE_REINCLUDED : CBM_IGNORE_IGNORED);
563 cbm_ignore_checked_free(owner);
564 return ok;
565}
566
567static bool gic_attempt_case(bool earlier) {
568 char pattern[96], path[64];

Callers 1

Calls 6

gic_limitsFunction · 0.85
gic_openFunction · 0.85
gic_parseFunction · 0.85
gic_match_limitFunction · 0.85
gic_matchFunction · 0.85
cbm_ignore_checked_freeFunction · 0.85

Tested by

no test coverage detected