Extracting the current rogue commit handler

in preparation for the Python version @bravenewprince is building.