commit: simplify building parents list