summaryrefslogtreecommitdiff
path: root/connected.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2020-01-12 04:15:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-30 18:55:31 (GMT)
commit50033772d50ef3c4023d63561d20bc61db96500e (patch)
tree99669783c6a4319593cd5f0555e5b17894e9bdb9 /connected.h
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-50033772d50ef3c4023d63561d20bc61db96500e.zip
git-50033772d50ef3c4023d63561d20bc61db96500e.tar.gz
git-50033772d50ef3c4023d63561d20bc61db96500e.tar.bz2
connected: verify promisor-ness of partial clone
Commit dfa33a298d ("clone: do faster object check for partial clones", 2019-04-21) optimized the connectivity check done when cloning with --filter to check only the existence of objects directly pointed to by refs. But this is not sufficient: they also need to be promisor objects. Make this check more robust by instead checking that these objects are promisor objects, that is, they appear in a promisor pack. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connected.h')
-rw-r--r--connected.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/connected.h b/connected.h
index ce2e7d8..eba5c26 100644
--- a/connected.h
+++ b/connected.h
@@ -48,12 +48,13 @@ struct check_connected_options {
unsigned is_deepening_fetch : 1;
/*
- * If non-zero, only check the top-level objects referenced by the
- * wanted refs (passed in as cb_data). This is useful for partial
- * clones, where enumerating and excluding all promisor objects is very
- * slow and the commit-walk itself becomes a no-op.
+ * If non-zero, only check that the top-level objects referenced by the
+ * wanted refs (passed in as cb_data) are promisor objects. This is
+ * useful for partial clones, where enumerating and excluding all
+ * promisor objects is very slow and the commit-walk itself becomes a
+ * no-op.
*/
- unsigned check_refs_only : 1;
+ unsigned check_refs_are_promisor_objects_only : 1;
};
#define CHECK_CONNECTED_INIT { 0 }