From 2bca5b679b9e1f7f7e5cfafa75a6a94549875197 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Thu, 7 Feb 2013 23:44:18 +0100 Subject: remote: Introduce git_remote_is_valid_name() Fix libgit2/libgit2sharp#318 --- include/git2/remote.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/git2') diff --git a/include/git2/remote.h b/include/git2/remote.h index b92a0cd04..6f36a3999 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -450,6 +450,14 @@ GIT_EXTERN(int) git_remote_update_fetchhead(git_remote *remote); */ GIT_EXTERN(void) git_remote_set_update_fetchhead(git_remote *remote, int value); +/** + * Ensure the remote name is well-formed. + * + * @param remote_name name to be checked. + * @return 1 if the reference name is acceptable; 0 if it isn't + */ +GIT_EXTERN(int) git_remote_is_valid_name(const char *remote_name); + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1