git.pack.collect_objects

git.pack

collect_objects(git_dir, wants) -> objects, err

Collect all objects reachable from the given commit/tag SHAs

Walks commits (parents + trees), trees (entries, skipping gitlinks), and annotated tags. Returns an array of { sha = hex, type = str }.