summaryrefslogtreecommitdiff
path: root/include/git2/refspec.h
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-02-11 09:12:39 -0800
committerPhilip Kelley <phkelley@hotmail.com>2013-02-11 09:12:39 -0800
commite026cfee003e103d79e56983d68a206ae907eada (patch)
tree16720580285b40a2208d07cd06d1abd893493991 /include/git2/refspec.h
parent8c29dca6c372cae1c6a97d78252ee1d7ac10673b (diff)
parentdb4bb4158f1005267e8d0e5785cb75487440580a (diff)
downloadlibgit2-e026cfee003e103d79e56983d68a206ae907eada.tar.gz
Merge pull request #1323 from jamill/resolve_remote
Resolve a remote branch's remote
Diffstat (limited to 'include/git2/refspec.h')
-rw-r--r--include/git2/refspec.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index ee06f8eca..ec7830b7c 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -53,6 +53,15 @@ GIT_EXTERN(int) git_refspec_force(const git_refspec *refspec);
GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *refname);
/**
+ * Check if a refspec's destination descriptor matches a reference
+ *
+ * @param refspec the refspec
+ * @param refname the name of the reference to check
+ * @return 1 if the refspec matches, 0 otherwise
+ */
+GIT_EXTERN(int) git_refspec_dst_matches(const git_refspec *refspec, const char *refname);
+
+/**
* Transform a reference to its target following the refspec's rules
*
* @param out where to store the target name
@@ -63,6 +72,17 @@ GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *
*/
GIT_EXTERN(int) git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
+/**
+ * Transform a target reference to its source reference following the refspec's rules
+ *
+ * @param out where to store the source reference name
+ * @param outlen the size of the `out` buffer
+ * @param spec the refspec
+ * @param name the name of the reference to transform
+ * @return 0, GIT_EBUFS or another error
+ */
+GIT_EXTERN(int) git_refspec_rtransform(char *out, size_t outlen, const git_refspec *spec, const char *name);
+
GIT_END_DECL
#endif