Function git_odb::data::output::count::objects[][src]

pub fn objects<Find, Iter, IterErr, Oid, PackCache, ObjectCache>(
    db: Find,
    make_caches: impl Fn() -> (PackCache, ObjectCache) + Send + Sync,
    objects_ids: Iter,
    progress: impl Progress,
    should_interrupt: &AtomicBool,
    Options
) -> Result<(Vec<Count, Global>, Outcome), Error<Error<<Find as Find>::Error>, IterErr>> where
    Find: Find + Send + Sync,
    Iter: Iterator<Item = Result<Oid, IterErr>> + Send,
    Oid: Into<ObjectId> + Send,
    IterErr: Error + Send,
    PackCache: DecodeEntry,
    ObjectCache: Object,
    <Find as Find>::Error: Send
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 caches
  • objects_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