summaryrefslogtreecommitdiff
path: root/src/refspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refspec.c')
-rw-r--r--src/refspec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/refspec.c b/src/refspec.c
index 7a85259f3..38cbb05ee 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -25,6 +25,7 @@
#include "common.h"
#include "refspec.h"
+#include "util.h"
int git_refspec_parse(git_refspec *refspec, const char *str)
{
@@ -64,3 +65,8 @@ const char *git_refspec_dst(const git_refspec *refspec)
{
return refspec->dst;
}
+
+int git_refspec_src_match(const git_refspec *refspec, const char *refname)
+{
+ return git__fnmatch(refspec->src, refname, 0);
+}