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

Function gic_terminal

tests/test_gitignore_checked.c:185–206  ·  view source on GitHub ↗

A latched failure leaves every accounting field and earlier program intact; * neither an ordinary parse nor a match may turn it into successful no-opinion. */

Source from the content-addressed store, hash-verified

183/* A latched failure leaves every accounting field and earlier program intact;
184 * neither an ordinary parse nor a match may turn it into successful no-opinion. */
185static bool gic_terminal(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *old_program,
186 cbm_ignore_checked_status_t expected) {
187 cbm_ignore_checked_usage_t before, after;
188 if (!cbm_ignore_checked_usage(owner, &before) || before.terminal_status != expected)
189 return false;
190 cbm_ignore_checked_control_t control = gic_control();
191 cbm_ignore_checked_parse_result_t out = {.program = old_program, .pattern_count = 77};
192 cbm_ignore_checked_error_t error;
193 if (!gic_status(cbm_ignore_checked_parse(owner, "x", 1, &control, &out, &error), expected,
194 &error) ||
195 out.program || out.pattern_count)
196 return false;
197 if (old_program) {
198 cbm_ignore_decision_t decision = CBM_IGNORE_IGNORED;
199 if (!gic_status(cbm_ignore_checked_match(owner, old_program, "x", 1, false, &control,
200 &decision, &error),
201 expected, &error) ||
202 decision != CBM_IGNORE_UNAVAILABLE)
203 return false;
204 }
205 return cbm_ignore_checked_usage(owner, &after) && gic_usage_equal(&before, &after);
206}
207
208static bool gic_bad_span(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *old_program,
209 unsigned kind) {

Callers 8

gic_bad_spanFunction · 0.85
gic_replayFunction · 0.85
gic_match_limitFunction · 0.85
gic_long_runFunction · 0.85
gic_expiredFunction · 0.85
gic_parse_oomFunction · 0.85
gic_oom_quota_firstFunction · 0.85

Calls 6

cbm_ignore_checked_usageFunction · 0.85
gic_controlFunction · 0.85
gic_statusFunction · 0.85
cbm_ignore_checked_parseFunction · 0.85
cbm_ignore_checked_matchFunction · 0.85
gic_usage_equalFunction · 0.85

Tested by

no test coverage detected