diff options
author | Vicent Marti <tanoku@gmail.com> | 2012-05-19 03:46:11 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2012-05-19 03:46:11 +0400 |
commit | 5b9fac39d8a76b9139667c26a63e6b3f204b3977 (patch) | |
tree | e6ba28025f92c16563c4ffa8bc60b95f17d69691 /src/ignore.h | |
parent | 7ef9f1b5606c2672105ecbbf34c022a71ef212fe (diff) | |
parent | ad5df35a47d56c3d716d7a56eac4aeb611987c11 (diff) |
Merge branch 'development'v0.17.0
Conflicts:
.travis.yml
Diffstat (limited to 'src/ignore.h')
-rw-r--r-- | src/ignore.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/ignore.h b/src/ignore.h index 9f87ae56e..809d2edbd 100644 --- a/src/ignore.h +++ b/src/ignore.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2011 the libgit2 contributors + * Copyright (C) 2009-2012 the libgit2 contributors * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. @@ -10,14 +10,29 @@ #include "repository.h" #include "vector.h" +/* The git_ignores structure maintains three sets of ignores: + * - internal ignores + * - per directory ignores + * - global ignores (at lower priority than the others) + * As you traverse from one directory to another, you can push and pop + * directories onto git_ignores list efficiently. + */ typedef struct { git_repository *repo; - char *dir; - git_vector stack; + git_buf dir; + git_attr_file *ign_internal; + git_vector ign_path; + git_vector ign_global; } git_ignores; -extern int git_ignore__for_path(git_repository *repo, const char *path, git_ignores *stack); -extern void git_ignore__free(git_ignores *stack); -extern int git_ignore__lookup(git_ignores *stack, const char *path, int *ignored); +extern int git_ignore__for_path(git_repository *repo, const char *path, git_ignores *ign); + +extern int git_ignore__push_dir(git_ignores *ign, const char *dir); + +extern int git_ignore__pop_dir(git_ignores *ign); + +extern void git_ignore__free(git_ignores *ign); + +extern int git_ignore__lookup(git_ignores *ign, const char *path, int *ignored); #endif |