summaryrefslogtreecommitdiffstats
path: root/send-pack.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2013-11-23 17:07:55 +0100
committerJunio C Hamano <gitster@pobox.com>2013-11-25 13:16:19 -0800
commit1ba98a79f1b991e6f2b1d01ac392ba2edadc3ca1 (patch)
tree11c0b5f8bd0f9eb190bb4dca6682c2e53db52550 /send-pack.c
parentf26f72de159d7ade2fbe8b48734ce98c1aba4d72 (diff)
downloadgit-1ba98a79f1b991e6f2b1d01ac392ba2edadc3ca1.tar.gz
git-1ba98a79f1b991e6f2b1d01ac392ba2edadc3ca1.tar.xz
send-pack: don't send a thin pack to a server which doesn't support it
Up to now git has assumed that all servers are able to fix thin packs. This is however not always the case. Document the 'no-thin' capability and prevent send-pack from generating a thin pack if the server advertises it. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index fab62e3da..9ee8cf50a 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -206,6 +206,8 @@ int send_pack(struct send_pack_args *args,
quiet_supported = 1;
if (server_supports("agent"))
agent_supported = 1;
+ if (server_supports("no-thin"))
+ args->use_thin_pack = 0;
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"