diff options
author | Jameson Miller <jamill@microsoft.com> | 2013-02-08 11:05:47 -0500 |
---|---|---|
committer | Jameson Miller <jamill@microsoft.com> | 2013-02-11 11:36:22 -0500 |
commit | 2e3e8c889b5fac03ca0f3b1f1303bbdabb15f1a5 (patch) | |
tree | c3b9c06a9756e6d2a2f0ab460e94665804a8fbf3 /src/refspec.c | |
parent | ff9df88396c79d16f560308ce1b874682868ba8f (diff) | |
download | libgit2-2e3e8c889b5fac03ca0f3b1f1303bbdabb15f1a5.tar.gz |
Teach remote branch to return its remote
Diffstat (limited to 'src/refspec.c')
-rw-r--r-- | src/refspec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/refspec.c b/src/refspec.c index bd69f58ae..4f324d3c1 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -159,6 +159,14 @@ int git_refspec_src_matches(const git_refspec *refspec, const char *refname) return (p_fnmatch(refspec->src, refname, 0) == 0); } +int git_refspec_dst_matches(const git_refspec *refspec, const char *refname) +{ + if (refspec == NULL || refspec->dst == NULL) + return false; + + return (p_fnmatch(refspec->dst, refname, 0) == 0); +} + int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name) { size_t baselen, namelen; |