summaryrefslogtreecommitdiff
path: root/src/refspec.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
commit3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e (patch)
tree1774677db7e5f0e33c3ab3967d64e2c95a631a5e /src/refspec.c
parentb02bcd97f80beabc96cd1f861bfc3b5f7532ef8b (diff)
downloadlibgit2-3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e.tar.gz
Remove old and unused error codes
Diffstat (limited to 'src/refspec.c')
-rw-r--r--src/refspec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/refspec.c b/src/refspec.c
index bec770a30..ee4d3a158 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -10,6 +10,7 @@
#include "common.h"
#include "refspec.h"
#include "util.h"
+#include "posix.h"
int git_refspec_parse(git_refspec *refspec, const char *str)
{
@@ -52,9 +53,12 @@ const char *git_refspec_dst(const git_refspec *refspec)
return refspec == NULL ? NULL : refspec->dst;
}
-int git_refspec_src_match(const git_refspec *refspec, const char *refname)
+int git_refspec_src_matches(const git_refspec *refspec, const char *refname)
{
- return (refspec == NULL || refspec->src == NULL) ? GIT_ENOMATCH : git__fnmatch(refspec->src, refname, 0);
+ if (refspec == NULL || refspec->src == NULL)
+ return false;
+
+ return (p_fnmatch(refspec->src, refname, 0) == 0);
}
int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name)