git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlos Martín Nieto" <cmn@elego.de>
To: git@vger.kernel.org
Cc: jrnieder@gmail.com, pclouds@gmail.com
Subject: [PATCH 2/2] send-pack: only send a thin pack if the server supports it
Date: Wed,  6 Nov 2013 16:04:23 +0100	[thread overview]
Message-ID: <1383750263-32495-3-git-send-email-cmn@elego.de> (raw)
In-Reply-To: <1383750263-32495-1-git-send-email-cmn@elego.de>

In combination a the previous patch making receive-pack advertise the
thin-pack capability, this allows git to push to a server in a
constrained environment which is not able to fix thin packs while taking
advantage of the feature for servers which can.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
---
 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.652.g0d6e0ce

  parent reply	other threads:[~2013-11-06 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 15:04 [PATCH 0/2] thin-pack capability for send-pack/receive-pack Carlos Martín Nieto
2013-11-06 15:04 ` [PATCH 1/2] receive-pack: advertise thin-pack Carlos Martín Nieto
2013-11-06 15:04 ` Carlos Martín Nieto [this message]
2013-11-06 20:32 ` [PATCH 0/2] thin-pack capability for send-pack/receive-pack Junio C Hamano
2013-11-06 21:41   ` Carlos Martín Nieto
2013-11-06 22:25     ` Junio C Hamano
2013-11-06 22:54       ` Jeff King
2013-11-06 23:47         ` Shawn Pearce
2013-11-06 23:42     ` Shawn Pearce
2013-11-23 15:09       ` Carlos Martín Nieto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383750263-32495-3-git-send-email-cmn@elego.de \
    --to=cmn@elego.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).