From 1217c5b232a2343f711ecf4c4ed38211ee6a268a Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 1 Nov 2021 21:12:23 -0400 Subject: fs_path: remove now-unused validation functions --- src/fs_path.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/fs_path.c') diff --git a/src/fs_path.c b/src/fs_path.c index 56980148e..957f389cc 100644 --- a/src/fs_path.c +++ b/src/fs_path.c @@ -1738,52 +1738,6 @@ int git_fs_path_validate_str_length_with_suffix( return 0; } -#ifdef GIT_WIN32 -GIT_INLINE(bool) should_validate_longpaths(git_repository *repo) -{ - int longpaths = 0; - - if (repo && - git_repository__configmap_lookup(&longpaths, repo, GIT_CONFIGMAP_LONGPATHS) < 0) - longpaths = 0; - - return (longpaths == 0); -} - -#else - -GIT_INLINE(bool) should_validate_longpaths(git_repository *repo) -{ - GIT_UNUSED(repo); - - return false; -} -#endif - -int git_fs_path_validate_workdir(git_repository *repo, const char *path) -{ - if (should_validate_longpaths(repo)) - return git_fs_path_validate_filesystem(path, strlen(path)); - - return 0; -} - -int git_fs_path_validate_workdir_with_len( - git_repository *repo, - const char *path, - size_t path_len) -{ - if (should_validate_longpaths(repo)) - return git_fs_path_validate_filesystem(path, path_len); - - return 0; -} - -int git_fs_path_validate_workdir_buf(git_repository *repo, git_str *path) -{ - return git_fs_path_validate_workdir_with_len(repo, path->ptr, path->size); -} - int git_fs_path_normalize_slashes(git_str *out, const char *path) { int error; -- cgit v1.2.1