git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] push: respect --no-thin
@ 2013-08-10 10:10 Nguyễn Thái Ngọc Duy
  2013-08-10 10:31 ` Jeff King
  2013-08-11  1:24 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
  0 siblings, 2 replies; 10+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2013-08-10 10:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jeff King, Ramkumar Ramachandra, Martin Fick,
	Nguyễn Thái Ngọc Duy

Over the time the default value for --thin has been switched between
on and off. As of now it's always on, even if --no-thin is given.
Correct the code to respect --no-thin.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/push.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/builtin/push.c b/builtin/push.c
index 04f0eaf..333a1fb 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -15,7 +15,7 @@ static const char * const push_usage[] = {
 	NULL,
 };
 
-static int thin;
+static int thin = 1;
 static int deleterefs;
 static const char *receivepack;
 static int verbosity;
@@ -313,8 +313,7 @@ static int push_with_options(struct transport *transport, int flags)
 	if (receivepack)
 		transport_set_option(transport,
 				     TRANS_OPT_RECEIVEPACK, receivepack);
-	if (thin)
-		transport_set_option(transport, TRANS_OPT_THIN, "yes");
+	transport_set_option(transport, TRANS_OPT_THIN, thin ? "yes" : NULL);
 
 	if (verbosity > 0)
 		fprintf(stderr, _("Pushing to %s\n"), transport->url);
-- 
1.8.2.83.gc99314b

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-13 16:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-10 10:10 [PATCH] push: respect --no-thin Nguyễn Thái Ngọc Duy
2013-08-10 10:31 ` Jeff King
2013-08-10 11:45   ` Duy Nguyen
2013-08-11  1:24 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2013-08-11  5:12   ` Eric Sunshine
2013-08-11  8:52   ` [PATCH v3] " Nguyễn Thái Ngọc Duy
2013-08-12  5:59     ` Junio C Hamano
2013-08-12 11:30       ` Duy Nguyen
2013-08-13 16:43         ` Junio C Hamano
2013-08-12 13:55     ` [PATCH v4] " Nguyễn Thái Ngọc Duy

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).