path: validate -> is_valid

Since we're returning a boolean about validation, the name is more
properly "is valid".
This commit is contained in:
Edward Thomson
2021-11-01 09:34:32 -04:00
parent 434a46107b
commit 63e36c53ca
8 changed files with 70 additions and 70 deletions

View File

@@ -1281,14 +1281,14 @@ static int checkout_verify_paths(
unsigned int flags = GIT_PATH_REJECT_WORKDIR_DEFAULTS;
if (action & CHECKOUT_ACTION__REMOVE) {
if (!git_path_validate(repo, delta->old_file.path, delta->old_file.mode, flags)) {
if (!git_path_is_valid(repo, delta->old_file.path, delta->old_file.mode, flags)) {
git_error_set(GIT_ERROR_CHECKOUT, "cannot remove invalid path '%s'", delta->old_file.path);
return -1;
}
}
if (action & ~CHECKOUT_ACTION__REMOVE) {
if (!git_path_validate(repo, delta->new_file.path, delta->new_file.mode, flags)) {
if (!git_path_is_valid(repo, delta->new_file.path, delta->new_file.mode, flags)) {
git_error_set(GIT_ERROR_CHECKOUT, "cannot checkout to invalid path '%s'", delta->new_file.path);
return -1;
}