diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-08-04 13:07:55 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-08-18 02:34:08 +0200 |
commit | e1d88030687b2ccd652cfedd97714fb37367bbf9 (patch) | |
tree | 57b33e70540666ebc38e12a16b7de7ff23cb00ab /include/git2/remote.h | |
parent | 44daec422950e0227a863021b6bf4fb8554b6c9c (diff) | |
download | libgit2-e1d88030687b2ccd652cfedd97714fb37367bbf9.tar.gz |
Don't expose the fetch code to the user
Move the generation of the want-list to be done from the negotiate
function, and keep the filtered references inside the remote
structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 93bc83452..207fe271d 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -91,9 +91,12 @@ GIT_EXTERN(const git_refspec *) git_remote_pushspec(struct git_remote *remote); /** * Open a connection to a remote * - * The transport is selected based on the URL + * The transport is selected based on the URL. The direction argument + * is due to a limitation of the git protocol (over TCP or SSH) which + * starts up a specific binary which can only do the one or the other. * * @param remote the remote to connect to + * @param direction whether you want to receive or send data * @return GIT_SUCCESS or an error code */ GIT_EXTERN(int) git_remote_connect(struct git_remote *remote, int direction); @@ -110,6 +113,14 @@ GIT_EXTERN(int) git_remote_connect(struct git_remote *remote, int direction); GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headarray *refs); /** + * Negotiate what data needs to be exchanged to synchroize the remtoe + * and local references + * + * @param remote the remote you want to negotiate with + */ +GIT_EXTERN(int) git_remote_negotiate(git_remote *remote); + +/** * Free the memory associated with a remote * * @param remote the remote to free |