summaryrefslogtreecommitdiff
path: root/builtin/fetch-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-21 08:18:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-23 19:18:18 (GMT)
commit9ba380481cc3a5ae7706763d71cf8844917ed804 (patch)
tree44a1f26052d15dfc349e0edc34df0117cb0595e7 /builtin/fetch-pack.c
parentc6807a40dcd29f7e5ad1e2f4fc44f1729c9afa11 (diff)
downloadgit-9ba380481cc3a5ae7706763d71cf8844917ed804.zip
git-9ba380481cc3a5ae7706763d71cf8844917ed804.tar.gz
git-9ba380481cc3a5ae7706763d71cf8844917ed804.tar.bz2
smart http: use the same connectivity check on cloning
This is an extension of c6807a4 (clone: open a shortcut for connectivity check - 2013-05-26) to reduce the cost of connectivity check at clone time, this time with smart http protocol. 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 'builtin/fetch-pack.c')
-rw-r--r--builtin/fetch-pack.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index aba4465..3e19d71 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -100,6 +100,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
pack_lockfile_ptr = &pack_lockfile;
continue;
}
+ if (!strcmp("--check-self-contained-and-connected", arg)) {
+ args.check_self_contained_and_connected = 1;
+ continue;
+ }
usage(fetch_pack_usage);
}
@@ -152,6 +156,11 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
printf("lock %s\n", pack_lockfile);
fflush(stdout);
}
+ if (args.check_self_contained_and_connected &&
+ args.self_contained_and_connected) {
+ printf("connectivity-ok\n");
+ fflush(stdout);
+ }
close(fd[0]);
close(fd[1]);
if (finish_connect(conn))