Skip to content

Commit 434a461

Browse files
committed
fs_path: validate -> is_valid
Since we're returning a boolean about validation, the name is more properly "is valid".
1 parent 95117d4 commit 434a461

File tree

4 files changed

+139
-139
lines changed

4 files changed

+139
-139
lines changed

src/fs_path.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ static bool validate_component(
16341634
return true;
16351635
}
16361636

1637-
bool git_fs_path_validate_ext(
1637+
bool git_fs_path_is_valid_ext(
16381638
const char *path,
16391639
unsigned int flags,
16401640
bool (*validate_char_cb)(char ch, void *payload),
@@ -1673,9 +1673,9 @@ bool git_fs_path_validate_ext(
16731673
return true;
16741674
}
16751675

1676-
bool git_fs_path_validate(const char *path, unsigned int flags)
1676+
bool git_fs_path_is_valid(const char *path, unsigned int flags)
16771677
{
1678-
return git_fs_path_validate_ext(path, flags, NULL, NULL, NULL);
1678+
return git_fs_path_is_valid_ext(path, flags, NULL, NULL, NULL);
16791679
}
16801680

16811681
#ifdef GIT_WIN32

src/fs_path.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,13 @@ extern int git_fs_path_from_url_or_path(git_str *local_path_out, const char *url
627627
* (trailing ' ' or ':' characters), or filenames ("component names")
628628
* that are not supported ('AUX', 'COM1").
629629
*/
630-
extern bool git_fs_path_validate(const char *path, unsigned int flags);
630+
extern bool git_fs_path_is_valid(const char *path, unsigned int flags);
631631

632632
/**
633633
* Validate a filesystem path; with custom callbacks per-character and
634634
* per-path component.
635635
*/
636-
extern bool git_fs_path_validate_ext(
636+
extern bool git_fs_path_is_valid_ext(
637637
const char *path,
638638
unsigned int flags,
639639
bool (*validate_char_cb)(char ch, void *payload),

src/path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ bool git_path_validate(
301301
data.file_mode = file_mode;
302302
data.flags = flags;
303303

304-
return git_fs_path_validate_ext(path, flags, NULL, validate_repo_component, &data);
304+
return git_fs_path_is_valid_ext(path, flags, NULL, validate_repo_component, &data);
305305
}
306306

307307
static const struct {

0 commit comments

Comments
 (0)