Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2019-04-20 00:00:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-21 08:08:53 +0300
commitdfa33a298de2ab724d4812633bb009a90d1df790 (patch)
treef15ffe4ed29fe4acadffd36d8c49057ecec538ce /connected.h
parent041f5ea1cf987a4068ef5f39ba0a09be85952064 (diff)
clone: do faster object check for partial clones
For partial clones, doing a full connectivity check is wasteful; we skip promisor objects (which, for a partial clone, is all known objects), and enumerating them all to exclude them from the connectivity check can take a significant amount of time on large repos. At most, we want to make sure that we get the objects referred to by any wanted refs. For partial clones, just check that these objects were transferred. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connected.h')
-rw-r--r--connected.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/connected.h b/connected.h
index 8d5a6b3ad6..ce2e7d8f2e 100644
--- a/connected.h
+++ b/connected.h
@@ -46,6 +46,14 @@ struct check_connected_options {
* during a fetch.
*/
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.
+ */
+ unsigned check_refs_only : 1;
};
#define CHECK_CONNECTED_INIT { 0 }