diff options
Diffstat (limited to 'include/git2/refs.h')
| -rw-r--r-- | include/git2/refs.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index acca69215..10b73f0c9 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -392,7 +392,8 @@ enum { /** * Control whether one-level refnames are accepted * (i.e., refnames that do not contain multiple /-separated - * components) + * components). Those are expected to be written only using + * uppercase letters and underscore (FETCH_HEAD, ...) */ GIT_REF_FORMAT_ALLOW_ONELEVEL = (1 << 0), @@ -452,6 +453,16 @@ GIT_EXTERN(int) git_reference_peel( git_reference *ref, git_otype type); +/** + * Ensure the reference name is well-formed. + * + * @param refname name to be checked. + * + * @return 1 if the reference name is acceptable; 0 if it isn't + */ +GIT_EXTERN(int) git_reference_is_valid_name( + const char *refname); + /** @} */ GIT_END_DECL #endif |
