summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-10 18:35:37 +0200
committerVicent Marti <tanoku@gmail.com>2011-08-18 02:34:09 +0200
commit79e9c3eca29e31dff873a99e33c452c8d5d5b6ac (patch)
tree05e82dc0d9aee6dea40c35efbe682e5fdb8a3b88
parentcdfd7bd057c3a71bd5731640f04e61e95ac713fe (diff)
downloadlibgit2-79e9c3eca29e31dff873a99e33c452c8d5d5b6ac.tar.gz
Update transport lifetime documentation
The original was written before any code was written and had nothing to do with the way things are actually done. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
-rw-r--r--src/transport.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/transport.h b/src/transport.h
index e809734a7..b14684bcb 100644
--- a/src/transport.h
+++ b/src/transport.h
@@ -26,11 +26,16 @@ typedef struct git_transport_caps {
* making use of the direction if necessary. This function must also
* store the remote heads and any other information it needs.
*
- * If we just want to execute ls-remote, ->ls() gets
- * called. Otherwise, the have/want/need list needs to be built via
- * ->wanthaveneed(). We can then ->push() or ->pull(). When we're
- * done, we call ->close() to close the connection. ->free() takes
- * care of freeing all the resources.
+ * The next useful step is to call ->ls() to get the list of
+ * references available to the remote. These references may have been
+ * collected on connect, or we may build them now. For ls-remote,
+ * nothing else is needed other than closing the connection.
+ * Otherwise, the higher leves decide which objects we want to
+ * have. ->send_have() is used to tell the other end what we have. If
+ * we do need to download a pack, ->download_pack() is called.
+ *
+ * When we're done, we call ->close() to close the
+ * connection. ->free() takes care of freeing all the resources.
*/
struct git_transport {
@@ -52,14 +57,6 @@ struct git_transport {
*/
int (*ls)(struct git_transport *transport, git_headarray *headarray);
/**
- * Calculate want/have/need. May not even be needed.
- */
- int (*wanthaveneed)(struct git_transport *transport, void *something);
- /**
- * Build the pack
- */
- int (*build_pack)(struct git_transport *transport);
- /**
* Push the changes over
*/
int (*push)(struct git_transport *transport);