summaryrefslogtreecommitdiff
path: root/include/git2/refspec.h
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-06-05 12:52:44 -0700
committerBen Straub <bstraub@github.com>2012-06-05 12:52:44 -0700
commit56a5000d580ef5c9605bc9076610b5af9aa67518 (patch)
tree4026c8333991fbe221a17b5d16e5e4b52f66cb20 /include/git2/refspec.h
parente267c9fc1a4910d1081e97b4d7a411658ddc0def (diff)
parent01dbe273c9b6f86a613b67cee27212cf4bacf4c0 (diff)
downloadlibgit2-56a5000d580ef5c9605bc9076610b5af9aa67518.tar.gz
Merge branch 'development' into rev-parse
Conflicts: src/util.h tests-clar/refs/branches/listall.c
Diffstat (limited to 'include/git2/refspec.h')
-rw-r--r--include/git2/refspec.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 28afe652d..1100e9022 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -25,7 +25,7 @@ GIT_BEGIN_DECL
* @param refspec the refspec
* @return the refspec's source specifier
*/
-const char *git_refspec_src(const git_refspec *refspec);
+GIT_EXTERN(const char *) git_refspec_src(const git_refspec *refspec);
/**
* Get the destination specifier
@@ -33,7 +33,15 @@ const char *git_refspec_src(const git_refspec *refspec);
* @param refspec the refspec
* @return the refspec's destination specifier
*/
-const char *git_refspec_dst(const git_refspec *refspec);
+GIT_EXTERN(const char *) git_refspec_dst(const git_refspec *refspec);
+
+/**
+ * Get the force update setting
+ *
+ * @param refspec the refspec
+ * @return 1 if force update has been set, 0 otherwise
+ */
+GIT_EXTERN(int) git_refspec_force(const git_refspec *refspec);
/**
* Check if a refspec's source descriptor matches a reference
@@ -42,7 +50,7 @@ const char *git_refspec_dst(const git_refspec *refspec);
* @param refname the name of the reference to check
* @return 1 if the refspec matches, 0 otherwise
*/
-int git_refspec_src_matches(const git_refspec *refspec, const char *refname);
+GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *refname);
/**
* Transform a reference to its target following the refspec's rules
@@ -51,9 +59,9 @@ int git_refspec_src_matches(const git_refspec *refspec, const char *refname);
* @param outlen the size ouf the `out` buffer
* @param spec the refspec
* @param name the name of the reference to transform
- * @return GIT_SUCCESS, GIT_ESHORTBUFFER or another error
+ * @return 0, GIT_EBUFS or another error
*/
-int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
+GIT_EXTERN(int) git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
GIT_END_DECL