summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-02-07 23:44:18 +0100
committernulltoken <emeric.fermas@gmail.com>2013-02-11 23:19:41 +0100
commit2bca5b679b9e1f7f7e5cfafa75a6a94549875197 (patch)
tree90c9ae1b89aea407c34f54ad3a878f2425d186ab /include/git2/remote.h
parent4d811c3b77158fdb7ee50b389c3aa8763482c61a (diff)
downloadlibgit2-2bca5b679b9e1f7f7e5cfafa75a6a94549875197.tar.gz
remote: Introduce git_remote_is_valid_name()
Fix libgit2/libgit2sharp#318
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h8
1 files changed, 8 insertions, 0 deletions
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