diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-03-20 09:52:17 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-04-14 23:02:51 +0100 |
commit | 88323cd0723cf2f6cb6daa1d2fc275a3fdde5efc (patch) | |
tree | 1d2d7bd8e7b8096ab0dc0d45b8b4393c133044f9 /src/refdb_fs.c | |
parent | 78abfb172b170aca95527c32d8cea17994106c3e (diff) | |
download | libgit2-88323cd0723cf2f6cb6daa1d2fc275a3fdde5efc.tar.gz |
path: git_path_isvalid -> git_path_validate
If we want to validate more and different types of paths, the name
`git_path_validate` makes that easier and more expressive. We can add,
for example, `git_path_validate_foo` while the current name makes that
less ergonomic.
Diffstat (limited to 'src/refdb_fs.c')
-rw-r--r-- | src/refdb_fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index a5a6b3c0e..551732f6e 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -789,7 +789,7 @@ static int loose_lock(git_filebuf *file, refdb_fs_backend *backend, const char * GIT_ASSERT_ARG(backend); GIT_ASSERT_ARG(name); - if (!git_path_isvalid(backend->repo, name, 0, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) { + if (!git_path_validate(backend->repo, name, 0, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) { git_error_set(GIT_ERROR_INVALID, "invalid reference name '%s'", name); return GIT_EINVALIDSPEC; } @@ -1828,7 +1828,7 @@ static int lock_reflog(git_filebuf *file, refdb_fs_backend *backend, const char repo = backend->repo; - if (!git_path_isvalid(backend->repo, refname, 0, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) { + if (!git_path_validate(backend->repo, refname, 0, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) { git_error_set(GIT_ERROR_INVALID, "invalid reference name '%s'", refname); return GIT_EINVALIDSPEC; } |