diff options
Diffstat (limited to 'src/ignore.c')
-rw-r--r-- | src/ignore.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ignore.c b/src/ignore.c index b81676b94..1ac8afdf3 100644 --- a/src/ignore.c +++ b/src/ignore.c @@ -235,3 +235,20 @@ int git_ignore_clear_internal_rules( return error; } + +int git_ignore_path_is_ignored( + int *ignored, + git_repository *repo, + const char *path) +{ + int error; + git_ignores ignores; + + if (git_ignore__for_path(repo, path, &ignores) < 0) + return -1; + + error = git_ignore__lookup(&ignores, path, ignored); + git_ignore__free(&ignores); + return error; +} + |