summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-01 17:37:06 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-09 15:17:18 +0000
commit315a43b2f16fab679126f519a5dce1c9e1e335af (patch)
treebf233f04c88a8eabcf731d4719d9f8fd23491f77 /src/path.c
parentebacd24c6039c992ef9122a0d6f7de0ca4ba3bd1 (diff)
downloadlibgit2-315a43b2f16fab679126f519a5dce1c9e1e335af.tar.gz
path: introduce `git_path_str_is_valid`
Add a `git_str` based validity check; the existing `git_path_is_valid` defers to it.
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/path.c b/src/path.c
index a6b396f6d..933444de2 100644
--- a/src/path.c
+++ b/src/path.c
@@ -285,9 +285,9 @@ GIT_INLINE(unsigned int) dotgit_flags(
return flags;
}
-bool git_path_is_valid(
+bool git_path_str_is_valid(
git_repository *repo,
- const char *path,
+ const git_str *path,
uint16_t file_mode,
unsigned int flags)
{
@@ -301,7 +301,7 @@ bool git_path_is_valid(
data.file_mode = file_mode;
data.flags = flags;
- return git_fs_path_is_valid_ext(path, flags, NULL, validate_repo_component, NULL, &data);
+ return git_fs_path_str_is_valid_ext(path, flags, NULL, validate_repo_component, NULL, &data);
}
static const struct {