diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-04-04 19:59:57 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-04-28 13:03:34 +0100 |
commit | 9fb755d561e149b81950c7cc7d8cb5131b24079b (patch) | |
tree | e242de6ecdd0e2a5ce3d00aab2debef535063a4f /src/attr_file.h | |
parent | e52c2989fb6911ef74cccd87a57bffd884842d36 (diff) | |
download | libgit2-9fb755d561e149b81950c7cc7d8cb5131b24079b.tar.gz |
attr: validate workdir paths for attribute files
We should allow attribute files - inside working directories - to have
names longer than MAX_PATH when core.longpaths is set.
`git_attr_path__init` takes a repository to validate the path with.
Diffstat (limited to 'src/attr_file.h')
-rw-r--r-- | src/attr_file.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/attr_file.h b/src/attr_file.h index 2b6b1d623..617436b14 100644 --- a/src/attr_file.h +++ b/src/attr_file.h @@ -207,8 +207,11 @@ extern git_attr_assignment *git_attr_rule__lookup_assignment( typedef enum { GIT_DIR_FLAG_TRUE = 1, GIT_DIR_FLAG_FALSE = 0, GIT_DIR_FLAG_UNKNOWN = -1 } git_dir_flag; extern int git_attr_path__init( - git_attr_path *info, const char *path, const char *base, git_dir_flag is_dir); - + git_attr_path *out, + git_repository *repo, + const char *path, + const char *base, + git_dir_flag is_dir); extern void git_attr_path__free(git_attr_path *info); extern int git_attr_assignment__parse( |