Re: [PATCH 2/2] Clean up connection correctly if object fetch wasn't done
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Feb 4, 2008, 21:06 UTC
- Message-ID
- <alpine.LNX.1.00.0802041602020.13593@iabervon.org>
- In-Reply-To
- <alpine.LSU.1.00.0802042023160.8543@racer.site>
On Mon, 4 Feb 2008, Johannes Schindelin wrote:
Show 12 quoted lines
> Hi, > > On Mon, 4 Feb 2008, Daniel Barkalow wrote: > > > Further optimization allowed the fetch_objs call to be skipped if it > > isn't necessary. However, this leaves the connection in need of cleaning > > up to avoid getting an error message from the remote end when ssh is > > used. Fix this. > > I _think_ something similar is necessary for ls-remote, too (at least it > showed the same symptoms today, but I have not had time to investigate > yet).
Yup, exactly the same change to builtin-ls-remote that builtin-fetch needed.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c index 6dd31d1..0237549 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;