diff options
| author | Russell Belfer <rb@github.com> | 2012-04-26 10:51:45 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-04-26 10:51:45 -0700 |
| commit | d58336dda873704f8d12a8b78c3191deefa4ec14 (patch) | |
| tree | 84137abc698a572015d41975ced985fc0bd77e61 /src/attr_file.h | |
| parent | eb3d71a5bcd78cb4840e62194e8998141508af88 (diff) | |
| download | libgit2-d58336dda873704f8d12a8b78c3191deefa4ec14.tar.gz | |
Fix leading slash behavior in attrs/ignores
We were not following the git behavior for leading slashes
in path names when matching git ignores and git attribute
file patterns. This should fix issue #638.
Diffstat (limited to 'src/attr_file.h')
| -rw-r--r-- | src/attr_file.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attr_file.h b/src/attr_file.h index 677534158..10851bc49 100644 --- a/src/attr_file.h +++ b/src/attr_file.h @@ -10,6 +10,7 @@ #include "git2/attr.h" #include "vector.h" #include "pool.h" +#include "buffer.h" #define GIT_ATTR_FILE ".gitattributes" #define GIT_ATTR_FILE_INREPO "info/attributes" @@ -54,9 +55,10 @@ typedef struct { } git_attr_file; typedef struct { + git_buf full; const char *path; const char *basename; - int is_dir; + int is_dir; } git_attr_path; /* @@ -114,6 +116,8 @@ extern git_attr_assignment *git_attr_rule__lookup_assignment( extern int git_attr_path__init( git_attr_path *info, const char *path, const char *base); +extern void git_attr_path__free(git_attr_path *info); + extern int git_attr_assignment__parse( git_repository *repo, /* needed to expand macros */ git_pool *pool, |
