For the transition, http is going to keep its own logic until the
git/common code catches up with the implied multi_ack that http
has. This also has the side-effect of making the code cleaner and more
correct regardingt he protocol.
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().
This allows the caller to update an internal structure or update the
user output with the tips that were updated.
While in the area, only try to update the ref if the value is
different from its old one.
This function should exit after printing usage information if too few
arguments were specified.
Additionally, it should exit with a failure status if the first argument
supplied is not one in the internal command list.