summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-04-30 10:55:17 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-04-30 10:55:17 +0200
commit8d39f2a79067c9551286bb552457db71b88b64d3 (patch)
tree180092c0a39072878dffe30a1fd5a5460c872ecf /include/git2
parent4157851076d476b3b7f9a8bb9b85497517b14cdf (diff)
downloadlibgit2-8d39f2a79067c9551286bb552457db71b88b64d3.tar.gz
refspec: add direction accessor
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/refspec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 3e1b502ef..89ab81b02 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -52,6 +52,14 @@ GIT_EXTERN(const char *) git_refspec_string(const git_refspec *refspec);
GIT_EXTERN(int) git_refspec_force(const git_refspec *refspec);
/**
+ * Get the refspec's direction.
+ *
+ * @param the refspec
+ * @return GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
+ */
+GIT_EXTERN(git_direction) git_refspec_direction(const git_refspec *spec);
+
+/**
* Check if a refspec's source descriptor matches a reference
*
* @param refspec the refspec