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

[PATCH] remote show: Clean up connection correctly if object fetch wasn't done

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 2, 2008, 05:31 UTC
Message-ID
<alpine.LSU.1.00.0803020531310.22527@racer.site>

Like in ls-remote, we have to disconnect the transport after getting the remote refs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	I did not make the connection when commenting on ls-remote, that
	builtin-remote uses the same API...
 builtin-remote.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-remote.c b/builtin-remote.c
index 2ad1a8d..2405c2c 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -387,6 +387,7 @@ static int show_or_prune(int argc, const char **argv, int prune)
 		transport = transport_get(NULL, states.remote->url_nr > 0 ?
 			states.remote->url[0] : NULL);
 		ref = transport_get_remote_refs(transport);
+		transport_disconnect(transport);
 
 		read_branches();
 		got_states = get_ref_states(ref, &states);
-- 
1.5.4.3.446.gbe8932
Message 1 of 1 in “remote show: Clean up connection correctly if object fetch wasn't done”
  1. remote show: Clean up connection correctly if object fetch wasn't doneJohannes Schindelin, Mar 2, 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.