File tree Expand file tree Collapse file tree 2 files changed +0
-68
lines changed
Expand file tree Collapse file tree 2 files changed +0
-68
lines changed Original file line number Diff line number Diff line change @@ -1738,52 +1738,6 @@ int git_fs_path_validate_str_length_with_suffix(
17381738 return 0 ;
17391739}
17401740
1741- #ifdef GIT_WIN32
1742- GIT_INLINE (bool ) should_validate_longpaths (git_repository * repo )
1743- {
1744- int longpaths = 0 ;
1745-
1746- if (repo &&
1747- git_repository__configmap_lookup (& longpaths , repo , GIT_CONFIGMAP_LONGPATHS ) < 0 )
1748- longpaths = 0 ;
1749-
1750- return (longpaths == 0 );
1751- }
1752-
1753- #else
1754-
1755- GIT_INLINE (bool ) should_validate_longpaths (git_repository * repo )
1756- {
1757- GIT_UNUSED (repo );
1758-
1759- return false;
1760- }
1761- #endif
1762-
1763- int git_fs_path_validate_workdir (git_repository * repo , const char * path )
1764- {
1765- if (should_validate_longpaths (repo ))
1766- return git_fs_path_validate_filesystem (path , strlen (path ));
1767-
1768- return 0 ;
1769- }
1770-
1771- int git_fs_path_validate_workdir_with_len (
1772- git_repository * repo ,
1773- const char * path ,
1774- size_t path_len )
1775- {
1776- if (should_validate_longpaths (repo ))
1777- return git_fs_path_validate_filesystem (path , path_len );
1778-
1779- return 0 ;
1780- }
1781-
1782- int git_fs_path_validate_workdir_buf (git_repository * repo , git_str * path )
1783- {
1784- return git_fs_path_validate_workdir_with_len (repo , path -> ptr , path -> size );
1785- }
1786-
17871741int git_fs_path_normalize_slashes (git_str * out , const char * path )
17881742{
17891743 int error ;
Original file line number Diff line number Diff line change @@ -725,28 +725,6 @@ GIT_INLINE(int) git_fs_path_validate_filesystem(
725725 return git_fs_path_validate_filesystem_with_suffix (path , path_len , 0 );
726726}
727727
728- /**
729- * Validate a path relative to the repo's worktree. This ensures that
730- * the given working tree path is valid for the operating system/platform.
731- * This will ensure that an absolute path is smaller than MAX_PATH on
732- * Windows, while keeping `core.longpaths` configuration settings in mind.
733- *
734- * This should be checked by mechamisms like `git_checkout` after
735- * contructing on-disk paths and before trying to write them.
736- *
737- * If the repository is null, no repository configuration is applied.
738- */
739- extern int git_fs_path_validate_workdir (
740- git_repository * repo ,
741- const char * path );
742- extern int git_fs_path_validate_workdir_with_len (
743- git_repository * repo ,
744- const char * path ,
745- size_t path_len );
746- extern int git_fs_path_validate_workdir_buf (
747- git_repository * repo ,
748- git_str * buf );
749-
750728/**
751729 * Convert any backslashes into slashes
752730 */
You can’t perform that action at this time.
0 commit comments