summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/refspec.h1
-rw-r--r--include/git2/remote.h26
2 files changed, 27 insertions, 0 deletions
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 89ab81b02..c0b410cbf 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -9,6 +9,7 @@
#include "common.h"
#include "types.h"
+#include "net.h"
/**
* @file git2/refspec.h
diff --git a/include/git2/remote.h b/include/git2/remote.h
index f02b95678..2aa384a54 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -191,6 +191,32 @@ GIT_EXTERN(int) git_remote_get_push_refspecs(git_strarray *array, git_remote *re
GIT_EXTERN(void) git_remote_clear_refspecs(git_remote *remote);
/**
+ * Get the number of refspecs for a remote
+ *
+ * @param remote the remote
+ * @return the amount of refspecs configured in this remote
+ */
+GIT_EXTERN(size_t) git_remote_refspec_count(git_remote *remote);
+
+/**
+ * Get a refspec from the remote
+ *
+ * @param remote the remote to query
+ * @param n the refspec to get
+ * @return the nth refspec
+ */
+GIT_EXTERN(const git_refspec *)git_remote_get_refspec(git_remote *remote, size_t n);
+
+/**
+ * Remove a refspec from the remote
+ *
+ * @param remote the remote to query
+ * @param n the refspec to remove
+ * @return 0 or GIT_ENOTFOUND
+ */
+GIT_EXTERN(int) git_remote_remove_refspec(git_remote *remote, size_t n);
+
+/**
* Open a connection to a remote
*
* The transport is selected based on the URL. The direction argument