libgit2

git_config_backend_foreach_match

Version:

Perform an operation on each config variable in a given config backend, matching a regular expression.

This behaves like git_config_foreach_match except that only config entries from the given backend entry are enumerated.

The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.

Signature

int git_config_backend_foreach_match(git_config_backend *backend, const char *regexp, git_config_foreach_cb callback, void *payload);

Parameters

In
backend

where to get the variables from

const char *
In
regexp

regular expression to match against config names (can be NULL)

In
callback

the function to call on each variable

void *
In
payload

the data to pass to the callback

Returns

int

Versions