summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-11-14 07:21:47 -0800
committerVicent Martí <vicent@github.com>2013-11-14 07:21:47 -0800
commit7b947bf5cc59eefa83c28eb5f5fd8434207ebb8b (patch)
treee3158d9445263156684b0e78ea991778ec9b92ea /include/git2/remote.h
parent98eaf39a87164eeb284df5c0239c3a31dfb538e7 (diff)
parent886cc447389da78885a909a96b43ddbe67c9807f (diff)
downloadlibgit2-7b947bf5cc59eefa83c28eb5f5fd8434207ebb8b.tar.gz
Merge pull request #1951 from victorgp/create-remote-plus-fetch
Allowing create remotes with custom fetch spec
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 9e7d218a8..7410909dc 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -43,6 +43,25 @@ GIT_EXTERN(int) git_remote_create(
const char *url);
/**
+ * Add a remote with the provided fetch refspec (or default if NULL) to the repository's
+ * configuration. This
+ * calls git_remote_save before returning.
+ *
+ * @param out the resulting remote
+ * @param repo the repository in which to create the remote
+ * @param name the remote's name
+ * @param url the remote's url
+ * @param fetch the remote fetch value
+ * @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
+ */
+GIT_EXTERN(int) git_remote_create_with_fetchspec(
+ git_remote **out,
+ git_repository *repo,
+ const char *name,
+ const char *url,
+ const char *fetch);
+
+/**
* Create a remote in memory
*
* Create a remote with the given refspec in memory. You can use