Add ignore rules for a repository.
Excludesfile rules (i.e. .gitignore rules) are generally read from .gitignore files in the repository tree or from a shared system file only if a "core.excludesfile" config value is set. The library also keeps a set of per-repository internal ignores that can be configured in-memory and will not persist. This function allows you to add to that internal rules list.
Example usage:
error = git_ignore_add_rule(myrepo, "*.c\ndir/\nFile with space\n");
This would add three rules to the ignores.
Text of rules, the contents to add on a .gitignore file. It is okay to have multiple rules in the text; if so, each rule should be terminated with a newline.
0 on success