diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2008-02-04 13:26:23 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-05 00:40:18 -0800 |
commit | ba227857d24029917f1e939647d826037f026205 (patch) | |
tree | cca24f21c147cb784f4bc3f0ae04916d829b6140 /builtin-ls-remote.c | |
parent | man pages are littered with .ft C and others (diff) | |
download | tgif-ba227857d24029917f1e939647d826037f026205.tar.xz |
Reduce the number of connects when fetching
This shares the connection between getting the remote ref list and
getting objects in the first batch. (A second connection is still used
to follow tags).
When we do not fetch objects (i.e. either ls-remote disconnects after
getting list of refs, or we decide we are already up-to-date), we
clean up the connection properly; otherwise the connection is left
open in need of cleaning up to avoid getting an error message from
the remote end when ssh is used.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-ls-remote.c')
-rw-r--r-- | builtin-ls-remote.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c index 6dd31d1dd6..023754986e 100644 --- a/builtin-ls-remote.c +++ b/builtin-ls-remote.c @@ -94,6 +94,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack); ref = transport_get_remote_refs(transport); + transport_disconnect(transport); if (!ref) return 1; |