git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH 2/3] transport-helper: emit check-connectivity, cloning, and update-shallow options for import
Date: Thu, 12 Feb 2015 19:10:00 +0900	[thread overview]
Message-ID: <1423735801-11108-2-git-send-email-mh@glandium.org> (raw)
In-Reply-To: <1423735801-11108-1-git-send-email-mh@glandium.org>

The check-connectivity, cloning, and update-shallow options are currently only
emitted for the fetch command but should also be emitted for the import
command.

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 transport-helper.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/transport-helper.c b/transport-helper.c
index 23a741c..c3868e4 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -342,16 +342,6 @@ static int fetch_with_fetch(struct transport *transport,
 	int i;
 	struct strbuf buf = STRBUF_INIT;
 
-	if (data->check_connectivity &&
-	    data->transport_options.check_self_contained_and_connected)
-		set_helper_option(transport, "check-connectivity", "true");
-
-	if (transport->cloning)
-		set_helper_option(transport, "cloning", "true");
-
-	if (data->transport_options.update_shallow)
-		set_helper_option(transport, "update-shallow", "true");
-
 	for (i = 0; i < nr_heads; i++) {
 		const struct ref *posn = to_fetch[i];
 		if (posn->status & REF_STATUS_UPTODATE)
@@ -622,6 +612,16 @@ static int fetch(struct transport *transport,
 	if (!count)
 		return 0;
 
+	if (data->check_connectivity &&
+	    data->transport_options.check_self_contained_and_connected)
+		set_helper_option(transport, "check-connectivity", "true");
+
+	if (transport->cloning)
+		set_helper_option(transport, "cloning", "true");
+
+	if (data->transport_options.update_shallow)
+		set_helper_option(transport, "update-shallow", "true");
+
 	if (data->fetch)
 		return fetch_with_fetch(transport, nr_heads, to_fetch);
 
-- 
2.3.0.1.g55ac403.dirty

  reply	other threads:[~2015-02-12 10:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 10:09 [PATCH 1/3] transport-helper: emit progress and verbosity options after asking for capabilities Mike Hommey
2015-02-12 10:10 ` Mike Hommey [this message]
2015-02-12 10:10 ` [PATCH 3/3] transport-helper: fix typo in error message when --signed is not supported Mike Hommey
2015-02-12 10:20   ` Mike Hommey
2015-02-12 20:34   ` Junio C Hamano
2015-02-12 20:28 ` [PATCH 1/3] transport-helper: emit progress and verbosity options after asking for capabilities Junio C Hamano
2015-02-13  5:24   ` [PATCH 1/2] transport-helper: ask the helper to set progress and verbosity options after asking for its capabilities Mike Hommey
2015-02-13  5:24     ` [PATCH 2/2] transport-helper: ask the helper to set the same options for import as for fetch Mike Hommey
2015-02-13 19:36       ` Junio C Hamano
2015-02-13 22:14         ` Mike Hommey
2015-02-14  8:12           ` Junio C Hamano

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=1423735801-11108-2-git-send-email-mh@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).