alloc: add repository argument to alloc_commit_index