diff options
Diffstat (limited to 'connected.h')
-rw-r--r-- | connected.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/connected.h b/connected.h index a53f03a61a..ce2e7d8f2e 100644 --- a/connected.h +++ b/connected.h @@ -1,6 +1,7 @@ #ifndef CONNECTED_H #define CONNECTED_H +struct object_id; struct transport; /* @@ -38,14 +39,29 @@ struct check_connected_options { * Insert these variables into the environment of the child process. */ const char **env; + + /* + * If non-zero, check the ancestry chain completely, not stopping at + * any existing ref. This is necessary when deepening existing refs + * 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 } /* - * Make sure that our object store has all the commits necessary to - * connect the ancestry chain to some of our existing refs, and all - * the trees and blobs that these commits use. + * Make sure that all given objects and all objects reachable from them + * either exist in our object store or (if the repository is a partial + * clone) are promised to be available. * * Return 0 if Ok, non zero otherwise (i.e. some missing objects) * |