summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-12-16 08:57:05 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-12-30 17:02:50 +0000
commitfe794b2ea7fa2b59c2394eb874c4be99c115c693 (patch)
treeb8e6bb148cf6a911366f86d21c87ace163046244 /include/git2/remote.h
parent4eb97ef3bf18403fbce351ae4cac673655d2886a (diff)
downloadlibgit2-cmn/hide-push.tar.gz
remote: remove git_push from the public APIcmn/hide-push
Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 15a8d481f..452e556dd 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -320,6 +320,19 @@ GIT_EXTERN(int) git_remote_ls(const git_remote_head ***out, size_t *size, git_r
GIT_EXTERN(int) git_remote_download(git_remote *remote, const git_strarray *refspecs);
/**
+ * Create a packfile and send it to the server
+ *
+ * Connect to the remote if it hasn't been done yet, negotiate with
+ * the remote git which objects are missing, create a packfile with the missing objects and send it.
+ *
+ * @param remote the remote
+ * @param refspecs the refspecs to use for this negotiation and
+ * upload. Use NULL or an empty array to use the base refspecs
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_remote_upload(git_remote *remote, const git_strarray *refspecs, const git_push_options *opts);
+
+/**
* Check whether the remote is connected
*
* Check whether the remote's underlying transport is connected to the
@@ -407,7 +420,7 @@ GIT_EXTERN(int) git_remote_fetch(
* @param reflog_message message to use for the reflog of upated references
*/
GIT_EXTERN(int) git_remote_push(git_remote *remote,
- git_strarray *refspecs,
+ const git_strarray *refspecs,
const git_push_options *opts,
const git_signature *signature, const char *reflog_message);