libgit2

git_config_get_multivar_foreach

Version:

Get each value of a multivar in a foreach callback

The callback will be called on each variable found

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_get_multivar_foreach(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);

Parameters

In
cfg

where to look for the variable

const char *
In
name

the variable's name

const char *
In
regexp

regular expression to filter which variables we're interested in. Use NULL to indicate all

In
callback

the function to be called on each value of the variable

void *
In
payload

opaque pointer to pass to the callback

Returns

int

Versions