Commit 434a4610 by Edward Thomson

fs_path: `validate` -> `is_valid`

Since we're returning a boolean about validation, the name is more
properly "is valid".
parent 95117d47
...@@ -1634,7 +1634,7 @@ static bool validate_component( ...@@ -1634,7 +1634,7 @@ static bool validate_component(
return true; return true;
} }
bool git_fs_path_validate_ext( bool git_fs_path_is_valid_ext(
const char *path, const char *path,
unsigned int flags, unsigned int flags,
bool (*validate_char_cb)(char ch, void *payload), bool (*validate_char_cb)(char ch, void *payload),
...@@ -1673,9 +1673,9 @@ bool git_fs_path_validate_ext( ...@@ -1673,9 +1673,9 @@ bool git_fs_path_validate_ext(
return true; return true;
} }
bool git_fs_path_validate(const char *path, unsigned int flags) bool git_fs_path_is_valid(const char *path, unsigned int flags)
{ {
return git_fs_path_validate_ext(path, flags, NULL, NULL, NULL); return git_fs_path_is_valid_ext(path, flags, NULL, NULL, NULL);
} }
#ifdef GIT_WIN32 #ifdef GIT_WIN32
......
...@@ -627,13 +627,13 @@ extern int git_fs_path_from_url_or_path(git_str *local_path_out, const char *url ...@@ -627,13 +627,13 @@ extern int git_fs_path_from_url_or_path(git_str *local_path_out, const char *url
* (trailing ' ' or ':' characters), or filenames ("component names") * (trailing ' ' or ':' characters), or filenames ("component names")
* that are not supported ('AUX', 'COM1"). * that are not supported ('AUX', 'COM1").
*/ */
extern bool git_fs_path_validate(const char *path, unsigned int flags); extern bool git_fs_path_is_valid(const char *path, unsigned int flags);
/** /**
* Validate a filesystem path; with custom callbacks per-character and * Validate a filesystem path; with custom callbacks per-character and
* per-path component. * per-path component.
*/ */
extern bool git_fs_path_validate_ext( extern bool git_fs_path_is_valid_ext(
const char *path, const char *path,
unsigned int flags, unsigned int flags,
bool (*validate_char_cb)(char ch, void *payload), bool (*validate_char_cb)(char ch, void *payload),
......
...@@ -301,7 +301,7 @@ bool git_path_validate( ...@@ -301,7 +301,7 @@ bool git_path_validate(
data.file_mode = file_mode; data.file_mode = file_mode;
data.flags = flags; data.flags = flags;
return git_fs_path_validate_ext(path, flags, NULL, validate_repo_component, &data); return git_fs_path_is_valid_ext(path, flags, NULL, validate_repo_component, &data);
} }
static const struct { static const struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment