diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/errors.h | 3 | ||||
| -rw-r--r-- | include/git2/refspec.h | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index 09b1f26bb..334b9edab 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -125,6 +125,9 @@ typedef enum { /** Skip and passthrough the given ODB backend */ GIT_EPASSTHROUGH = -30, + + /** The path pattern and string did not match */ + GIT_ENOMATCH = -31, } git_error; /** diff --git a/include/git2/refspec.h b/include/git2/refspec.h index d45364f71..8523d5ab6 100644 --- a/include/git2/refspec.h +++ b/include/git2/refspec.h @@ -19,4 +19,14 @@ const char *git_refspec_src(const git_refspec *refspec); */ const char *git_refspec_dst(const git_refspec *refspec); +/** + * Match a refspec's source descriptor with a reference name + * + * @param refspec the refspec + * @param refname the name of the reference to check + * @return GIT_SUCCESS on successful match; GIT_ENOMACH on match + * failure or an error code on other failure + */ +int git_refspec_src_match(const git_refspec *refspec, const char *refname); + #endif |
