diff options
Diffstat (limited to 'src/ignore.c')
-rw-r--r-- | src/ignore.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ignore.c b/src/ignore.c index 8bf22e34a..7639b7ba9 100644 --- a/src/ignore.c +++ b/src/ignore.c @@ -146,3 +146,17 @@ found: return error; } + +int git_ignore_is_ignored(git_repository *repo, const char *path, int *ignored) +{ + int error; + git_vector ignores = GIT_VECTOR_INIT; + + if ((error = git_ignore__for_path(repo, path, &ignores)) == GIT_SUCCESS) + error = git_ignore__lookup(&ignores, path, ignored); + + git_ignore__free(&ignores); + + return error; +} + |