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

[PATCH] send-pack: don't send a thin pack when the server doesn't support it

From
Carlos Martín Nieto <cmn@elego.de>
Date
Oct 8, 2013, 08:44 UTC
Message-ID
<1381221884-27048-1-git-send-email-cmn@elego.de>

Not every server out there supports fixing thin packs, so let's send them a full pack.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
---

It's not always possible to support thin packs (sometimes there isn't even an object database to grab bases out of). And in any case git shouldn't create thin packs if the server hasn't said it knows how to fix them, as per the point of the extension.

 send-pack.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/send-pack.c b/send-pack.c
index 7d172ef..7b88ac8 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -205,6 +205,8 @@ int send_pack(struct send_pack_args *args,
 		quiet_supported = 1;
 	if (server_supports("agent"))
 		agent_supported = 1;
+	if (!server_supports("thin-pack"))
+		args->use_thin_pack = 0;
 
 	if (!remote_refs) {
 		fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
-- 
1.8.4.561.g1c3d45d
Next: Duy Nguyen
Message 1 of 6 in “send-pack: don't send a thin pack when the server doesn't support it”
  1. send-pack: don't send a thin pack when the server doesn't support itCarlos Martín Nieto, Oct 8, 2013
  2. Duy NguyenOct 8, 2013
  3. Carlos Martin NietoOct 8, 2013
  4. Duy NguyenOct 8, 2013
  5. Jonathan NiederOct 8, 2013
  6. Carlos Martín NietoOct 19, 2013

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.