They added it to the UI in 2018 but you could do it via URL since 2011.
> A diff view with reduced white space has been available since 2011 by adding ?w=1 to the URL.
https://github.blog/2018-05-01-ignore-white-space-in-code-re...
> A diff view with reduced white space has been available since 2011 by adding ?w=1 to the URL.
https://github.blog/2018-05-01-ignore-white-space-in-code-re...
That said, I'd ask the contributor to tidy up the branch first. It's kinda disrespecting to ask others to review branches in such state.