git_attr_get_many

Look up a list of git attributes for path.

Use this if you have a known list of attributes that you want to look up in a single call. This is somewhat more efficient than calling git_attr_get() multiple times.

For example, you might write:

const char *attrs[] = { "crlf", "diff", "foo" }; const char **values[3]; git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);

Then you could loop through the 3 values to get the settings for the three attributes you asked about.

@param values_out An array of num_attr entries that will have string pointers written into it for the values of the attributes. You should not modify or free the values that are written into this array (although of course, you should free the array itself if you allocated it). @param repo The repository containing the path. @param flags A combination of GIT_ATTR_CHECK... flags. @param path The 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). @param num_attr The number of attributes being looked up @param names An array of num_attr strings containing attribute names.

extern (C) nothrow @nogc
int
git_attr_get_many
(
const(char)** values_out
,,
uint flags
,
const(char)* path
,
size_t num_attr
,
const(char)** names
)

Meta