Function git_pack::data::output::count::objects [−][src]
pub fn objects<Find, Iter, IterErr, Oid, PackCache, ObjectCache>(
db: Find,
make_caches: impl Fn() -> (PackCache, ObjectCache) + Send + Clone,
objects_ids: Iter,
progress: impl Progress,
should_interrupt: &AtomicBool,
_: Options
) -> Result<Error<Find::Error>, IterErr> where
Find: Find + Send + Clone,
<Find as Find>::Error: Send,
Iter: Iterator<Item = Result<Oid, IterErr>> + Send,
Oid: Into<ObjectId> + Send,
IterErr: Error + Send,
PackCache: DecodeEntry,
ObjectCache: Object, Expand description
Generate Counts from input objects with object expansion based on options
to learn which objects would would constitute a pack. This step is required to know exactly how many objects would
be in a pack while keeping data around to avoid minimize object database access.
A Count object maintains enough state to greatly accelerate future access of packed objects.
db- the object store to use for accessing objects.make_cache- a function to create thread-local pack cachesobjects_ids- A list of objects ids to add to the pack. Duplication checks are performed so no object is ever added to a pack twice.
- Objects may be expanded based on the provided
options
progress- a way to obtain progress information
should_interrupt- A flag that is set to true if the operation should stop
options- more configuration