summaryrefslogtreecommitdiff
path: root/include/git2/refspec.h
diff options
context:
space:
mode:
authorcynecx <me@cynecx.net>2018-02-07 22:30:27 +0100
committercynecx <me@cynecx.net>2018-06-22 13:19:40 +0200
commit630a67366eb475003b46bf56dc06b90197458259 (patch)
treebae222f4a514b067f0c83c81f33bab6b97023029 /include/git2/refspec.h
parentb121b7ac972156cdc67b25be075fd62450b57f29 (diff)
downloadlibgit2-630a67366eb475003b46bf56dc06b90197458259.tar.gz
refspec: add public parsing api
Fix typo Fix some type issues More fixes Address requested changes Add test Fix naming Fix condition and tests Address requested changes Fix typo
Diffstat (limited to 'include/git2/refspec.h')
-rw-r--r--include/git2/refspec.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 9acdc72d5..eaf774746 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -22,6 +22,23 @@
GIT_BEGIN_DECL
/**
+ * Parse a given refspec string
+ *
+ * @param refspec a pointer to hold the refspec handle
+ * @param input the refspec string
+ * @param is_fetch is this a refspec for a fetch
+ * @return 0 if the refspec string could be parsed, -1 otherwise
+ */
+GIT_EXTERN(int) git_refspec_parse(git_refspec **refspec, const char *input, int is_fetch);
+
+/**
+ * Free a refspec object which has been created by git_refspec_parse
+ *
+ * @param refspec the refspec object
+ */
+GIT_EXTERN(void) git_refspec_free(git_refspec *refspec);
+
+/**
* Get the source specifier
*
* @param refspec the refspec