libgit2

git_attr_add_macro

Version:

Add a macro definition.

Macros will automatically be loaded from the top level .gitattributes file of the repository (plus the build-in "binary" macro). This function allows you to add others. For example, to add the default macro, you would call:

git_attr_add_macro(repo, "binary", "-diff -crlf");

Signature

int git_attr_add_macro(git_repository *repo, const char *name, const char *values);

Parameters

const char *
In
name
const char *
In
values

Returns

int

Versions