summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 13:02:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-11 00:14:18 (GMT)
commit16094885ca94f72abc28a915f9aa4021e203a16d (patch)
treed9622d3223844e17bd2195171ddfac32341431ba /transport-helper.c
parent58f2ed051fe9b966100d8c531a79200628490ec4 (diff)
downloadgit-16094885ca94f72abc28a915f9aa4021e203a16d.zip
git-16094885ca94f72abc28a915f9aa4021e203a16d.tar.gz
git-16094885ca94f72abc28a915f9aa4021e203a16d.tar.bz2
smart-http: support shallow fetch/clone
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 673b7c2..e2b4203 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -360,6 +360,12 @@ static int fetch_with_fetch(struct transport *transport,
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)