libgit2

git_attr_foreach_ext

Version:

Loop over all the git attributes for a path with extended options.

Signature

int git_attr_foreach_ext(git_repository *repo, git_attr_options *opts, const char *path, git_attr_foreach_cb callback, void *payload);

Parameters

In
repo

The repository containing the path.

In
opts

The git_attr_options to use when querying these attributes.

const char *
In
path

Path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory).

In
callback

Function to invoke on each attribute name and value. See git_attr_foreach_cb.

void *
In
payload

Passed on as extra parameter to callback function.

Returns

int

0 on success, non-zero callback return value, or error code

Versions