vendor/libgit2/src/path.h in rugged-0.27.10 vs vendor/libgit2/src/path.h in rugged-0.27.10.1

- old
+ new

@@ -11,12 +11,10 @@ #include "posix.h" #include "buffer.h" #include "vector.h" -#include "git2/sys/path.h" - /** * Path manipulation utils * * These are path utilities that munge paths without actually * looking at the real filesystem. @@ -645,12 +643,82 @@ /** * Convert any backslashes into slashes */ int git_path_normalize_slashes(git_buf *out, const char *path); -bool git_path_supports_symlinks(const char *dir); +/** + * Check whether a path component corresponds to a .gitmodules file + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_dotgit_modules(const char *name, size_t len); /** + * Check whether a path component corresponds to a .gitmodules file in NTFS + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_ntfs_dotgit_modules(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitmodules file in HFS+ + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_hfs_dotgit_modules(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitignore file + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_dotgit_ignore(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitignore file in NTFS + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_ntfs_dotgit_ignore(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitignore file in HFS+ + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_hfs_dotgit_ignore(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitignore file + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_dotgit_attributes(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitattributes file in NTFS + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_ntfs_dotgit_attributes(const char *name, size_t len); + +/** + * Check whether a path component corresponds to a .gitattributes file in HFS+ + * + * @param name the path component to check + * @param len the length of `name` + */ +extern int git_path_is_hfs_dotgit_attributes(const char *name, size_t len); + +/* * Validate a system file's ownership * * Verify that the file in question is owned by an administrator or system * account, or at least by the current user. *