libgit2

git_config_get_bool

Version:

Get the value of a boolean config variable.

This function uses the usual C convention of 0 being false and anything else true.

Signature

int git_config_get_bool(git_config *cfg, const char *name, int *out);

Parameters

In
cfg

where to look for the variable

const char *
In
name

the variable's name

int *
In
out

pointer to the variable where the value should be stored

Returns

int

GIT_SUCCESS on success; error code otherwise

Versions