commit-graph: extract fill_oids_from_all_packs()