libgit2

git_config_add_backend

Version:

Add a generic config file instance to an existing config

Note that the configuration object will free the file automatically.

Further queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).

Signature

int git_config_add_backend(git_config *cfg, git_config_backend *file, git_config_level_t level, int force);

Parameters

In
cfg

the configuration to add the file to

In
file

the configuration file (backend) to add

In
level

the priority level of the backend

int
In
force

if a config file already exists for the given priority level, replace it

Returns

int

0 on success, GIT_EEXISTS when adding more than one file for a given priority level (and force_replace set to 0), or error code

Versions