slightly improve logic for merge-only commits