Rewrite cherry-pick detect logic to use cherry-mark and right-only