diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2012-01-31 13:59:32 -0800 |
|---|---|---|
| committer | Russell Belfer <arrbee@arrbee.com> | 2012-01-31 13:59:32 -0800 |
| commit | adc9bdb3b1428b8edf067ab17c26ef15ec1ac8a7 (patch) | |
| tree | 779de1400c8c3385ab21fde0bac47b96081c50aa /src/ignore.h | |
| parent | 5d3cd4e309517a8ab2b553ad0839493ba45bb97d (diff) | |
| download | libgit2-adc9bdb3b1428b8edf067ab17c26ef15ec1ac8a7.tar.gz | |
Fix attr path is_dir check
When building an attr path object, the code that checks if the
file is a directory was evaluating the file as a relative path
to the current working directory, instead of using the repo root.
This lead to inconsistent behavior.
Diffstat (limited to 'src/ignore.h')
| -rw-r--r-- | src/ignore.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ignore.h b/src/ignore.h index 2954445b5..9f87ae56e 100644 --- a/src/ignore.h +++ b/src/ignore.h @@ -10,8 +10,14 @@ #include "repository.h" #include "vector.h" -extern int git_ignore__for_path(git_repository *repo, const char *path, git_vector *stack); -extern void git_ignore__free(git_vector *stack); -extern int git_ignore__lookup(git_vector *stack, const char *path, int *ignored); +typedef struct { + git_repository *repo; + char *dir; + git_vector stack; +} 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); #endif |
