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>
This commit is contained in:
Carlos Martín Nieto 2011-08-10 18:35:37 +02:00 committed by Vicent Marti
parent cdfd7bd057
commit 79e9c3eca2

View File

@ -26,11 +26,16 @@ typedef struct git_transport_caps {
* making use of the direction if necessary. This function must also * making use of the direction if necessary. This function must also
* store the remote heads and any other information it needs. * store the remote heads and any other information it needs.
* *
* If we just want to execute ls-remote, ->ls() gets * The next useful step is to call ->ls() to get the list of
* called. Otherwise, the have/want/need list needs to be built via * references available to the remote. These references may have been
* ->wanthaveneed(). We can then ->push() or ->pull(). When we're * collected on connect, or we may build them now. For ls-remote,
* done, we call ->close() to close the connection. ->free() takes * nothing else is needed other than closing the connection.
* care of freeing all the resources. * 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 { struct git_transport {
@ -51,14 +56,6 @@ struct git_transport {
* Give a list of references, useful for ls-remote * Give a list of references, useful for ls-remote
*/ */
int (*ls)(struct git_transport *transport, git_headarray *headarray); 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 * Push the changes over
*/ */