mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
path: validate -> is_valid
Since we're returning a boolean about validation, the name is more properly "is valid".
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user