libgit2

git_config_open_level

Version:

Build a single-level focused config object from a multi-level one.

The returned config object can be used to perform get/set/delete operations on a single specific level.

Getting several times the same level from the same parent multi-level config will return different config instances, but containing the same config_file instance.

Signature

int git_config_open_level(git_config **out, const git_config *parent, unsigned int level);

Parameters

In
out

The configuration instance to create

In
parent

Multi-level config to search for the given level

unsigned int
In
level

Configuration level to search for

Returns

int

0, GIT_ENOTFOUND if the passed level cannot be found in the multi-level parent config, or an error code

Versions