summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-22 20:42:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-22 20:42:43 (GMT)
commit0c601052a5f761fd9c207a56ae11789c8598e25d (patch)
tree3ede5e384f22b313aa16a5b6e85d3d764c52b6b0 /builtin
parent06aaafbd82aaf845d85c0f8eea78c52f1219187c (diff)
parent2b98478c6fc32b04434981c783b0472e0137cfad (diff)
downloadgit-0c601052a5f761fd9c207a56ae11789c8598e25d.zip
git-0c601052a5f761fd9c207a56ae11789c8598e25d.tar.gz
git-0c601052a5f761fd9c207a56ae11789c8598e25d.tar.bz2
Merge branch 'jt/connectivity-check-optim-in-partial-clone'
Simplify the commit ancestry connectedness check in a partial clone repository in which "promised" objects are assumed to be obtainable lazily on-demand from promisor remote repositories. * jt/connectivity-check-optim-in-partial-clone: connected: always use partial clone optimization
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c7
-rw-r--r--builtin/fetch.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index d8b1f41..ae27eef 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -676,8 +676,7 @@ static void update_remote_refs(const struct ref *refs,
const char *branch_top,
const char *msg,
struct transport *transport,
- int check_connectivity,
- int check_refs_are_promisor_objects_only)
+ int check_connectivity)
{
const struct ref *rm = mapped_refs;
@@ -686,8 +685,6 @@ static void update_remote_refs(const struct ref *refs,
opt.transport = transport;
opt.progress = transport->progress;
- opt.check_refs_are_promisor_objects_only =
- !!check_refs_are_promisor_objects_only;
if (check_connected(iterate_ref_map, &rm, &opt))
die(_("remote did not send all necessary objects"));
@@ -1282,7 +1279,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
update_remote_refs(refs, mapped_refs, remote_head_points_at,
branch_top.buf, reflog_msg.buf, transport,
- !is_local, filter_options.choice);
+ !is_local);
update_head(our_head_points_at, remote_head, reflog_msg.buf);
diff --git a/builtin/fetch.c b/builtin/fetch.c
index bf6bab8..1097e1e 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -908,13 +908,6 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
if (!connectivity_checked) {
struct check_connected_options opt = CHECK_CONNECTED_INIT;
- if (filter_options.choice)
- /*
- * Since a filter is specified, objects indirectly
- * referenced by refs are allowed to be absent.
- */
- opt.check_refs_are_promisor_objects_only = 1;
-
rm = ref_map;
if (check_connected(iterate_ref_map, &rm, &opt)) {
rc = error(_("%s did not send all necessary objects\n"), url);