vendor/libgit2/src/ignore.h in rugged-0.19.0 vs vendor/libgit2/src/ignore.h in rugged-0.21.0
- old
+ new
@@ -22,25 +22,35 @@
* As you traverse from one directory to another, you can push and pop
* directories onto git_ignores list efficiently.
*/
typedef struct {
git_repository *repo;
- git_buf dir;
+ git_buf dir; /* current directory reflected in ign_path */
git_attr_file *ign_internal;
git_vector ign_path;
git_vector ign_global;
+ size_t dir_root; /* offset in dir to repo root */
int ignore_case;
+ int depth;
} git_ignores;
-extern int git_ignore__for_path(git_repository *repo, const char *path, git_ignores *ign);
+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);
+enum {
+ GIT_IGNORE_UNCHECKED = -2,
+ GIT_IGNORE_NOTFOUND = -1,
+ GIT_IGNORE_FALSE = 0,
+ GIT_IGNORE_TRUE = 1,
+};
+
+extern int git_ignore__lookup(int *out, git_ignores *ign, const char *path);
/* command line Git sometimes generates an error message if given a
* pathspec that contains an exact match to an ignored file (provided
* --force isn't also given). This makes it easy to check it that has
* happened. Returns GIT_EINVALIDSPEC if the pathspec contains ignored