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

Function matches

config.c:2613–2627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2611}
2612
2613static int matches(const char *key, const char *value,
2614 const struct config_store_data *store)
2615{
2616 if (strcmp(key, store->key))
2617 return 0; /* not ours */
2618 if (store->fixed_value && value)
2619 return !strcmp(store->fixed_value, value);
2620 if (!store->value_pattern)
2621 return 1; /* always matches */
2622 if (store->value_pattern == CONFIG_REGEX_NONE)
2623 return 0; /* never matches */
2624
2625 return store->do_not_match ^
2626 (value && !regexec(store->value_pattern, value, 0, NULL, 0));
2627}
2628
2629static int store_aux_event(enum config_event_t type, size_t begin, size_t end,
2630 struct config_source *cs, void *data)

Callers 1

store_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected