vendor/libgit2/src/path.h in rugged-0.21.1b2 vs vendor/libgit2/src/path.h in rugged-0.21.2

- old
+ new

@@ -6,11 +6,10 @@ */ #ifndef INCLUDE_path_h__ #define INCLUDE_path_h__ #include "common.h" -#include "posix.h" #include "buffer.h" #include "vector.h" /** * Path manipulation utils @@ -126,18 +125,10 @@ GIT_INLINE(int) git_path_is_relative(const char *p) { return (p[0] == '.' && (p[1] == '/' || (p[1] == '.' && p[2] == '/'))); } -/** - * Check if string is at end of path segment (i.e. looking at '/' or '\0') - */ -GIT_INLINE(int) git_path_at_end_of_segment(const char *p) -{ - return !*p || *p == '/'; -} - extern int git__percent_decode(git_buf *decoded_out, const char *input); /** * Extract path from file:// URL. */ @@ -195,21 +186,10 @@ * @return true if subdirectory exists, false otherwise. */ extern bool git_path_contains_dir(git_buf *parent, const char *subdir); /** - * Make the path relative to the given parent path. - * - * @param path The path to make relative - * @param parent The parent path to make path relative to - * @return 0 if path was made relative, GIT_ENOTFOUND - * if there was not common root between the paths, - * or <0. - */ -extern int git_path_make_relative(git_buf *path, const char *parent); - -/** * Check if the given path contains the given file. * * @param dir Directory path that might contain file * @param file File name to look for in parent * @return true if file exists, false otherwise. @@ -321,11 +301,11 @@ * @param state Passed to fn as the first ath. */ extern int git_path_walk_up( git_buf *pathbuf, const char *ceiling, - int (*callback)(void *payload, const char *path), + int (*callback)(void *payload, git_buf *path), void *payload); /** * Load all directory entries (except '.' and '..') into a vector. * @@ -457,9 +437,8 @@ #endif /* GIT_USE_ICONV */ extern bool git_path_does_fs_decompose_unicode(const char *root); /* Used for paths to repositories on the filesystem */ -extern bool git_path_is_local_file_url(const char *file_url); extern int git_path_from_url_or_path(git_buf *local_path_out, const char *url_or_path); #endif