Fix commit-repair logic.