git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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;
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 4 in “Clean up connection correctly if object fetch wasn't done”
  1. 2/2 Clean up connection correctly if object fetch wasn't doneDaniel Barkalow, Feb 4, 2008
  2. Johannes SchindelinFeb 4, 2008
  3. Daniel BarkalowFeb 4, 2008
  4. Johannes SchindelinFeb 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.