summaryrefslogtreecommitdiff
path: root/include/git2/refspec.h
diff options
context:
space:
mode:
authorJameson Miller <jamill@microsoft.com>2013-02-07 14:53:52 -0500
committerJameson Miller <jamill@microsoft.com>2013-02-11 11:36:28 -0500
commitdb4bb4158f1005267e8d0e5785cb75487440580a (patch)
tree202676d5c68ae1560e6f3468baeb877e041e03cb /include/git2/refspec.h
parent2e3e8c889b5fac03ca0f3b1f1303bbdabb15f1a5 (diff)
downloadlibgit2-db4bb4158f1005267e8d0e5785cb75487440580a.tar.gz
Teach refspec to transform destination reference to source reference
Diffstat (limited to 'include/git2/refspec.h')
-rw-r--r--include/git2/refspec.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 3e83e41e2..ec7830b7c 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -53,7 +53,7 @@ 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
+ * Check if a refspec's destination descriptor matches a reference
*
* @param refspec the refspec
* @param refname the name of the reference to check
@@ -72,6 +72,17 @@ GIT_EXTERN(int) git_refspec_dst_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