repack: refactor setup of pack-objects cmd