libgit2/examples/network
Michael Schubert 42ea35c061 remote: don't free transport on disconnect
Currently, git_remote_disconnect not only closes the connection but also
frees the underlying transport object, making it impossible to write
code like

	// fetch stuff
	git_remote_download()

	// close connection
	git_remote_disconnect()

	// call user provided callback for each ref
	git_remote_update_tips(remote, callback)

because remote->refs points to references owned by the transport object.
This means, we have an idling connection while running the callback for
each reference.

Instead, allow immediate disconnect and free the transport later in
git_remote_free().
2012-05-02 01:06:49 +02:00
..
.gitignore examples/network/.gitignore: ignore 'git2' 2011-11-06 20:07:27 -06:00
common.h examples: add ls-remote, fetch and index-pack examples 2011-10-03 02:32:32 +02:00
fetch.c remote: don't free transport on disconnect 2012-05-02 01:06:49 +02:00
git2.c Use new error handling in the example network code 2012-04-11 19:16:10 +02:00
index-pack.c examples: stream indexer example 2012-04-13 22:19:45 +02:00
ls-remote.c remote: Cleanup the remotes code 2011-11-28 08:40:40 +01:00
Makefile remote: run a callback when updating the branch tips 2012-04-25 13:25:45 +02:00