Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15
STALE3744d

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

From: Carlos Martín Nieto <hidden>
Date: 2016-06-15 22:58:57
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Carlos Martín Nieto <redacted>
---

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help