This failed on freebsd_gcc task in Cirrus because Perl is not installed, see https://github.com/mawww/kakoune/pull/5101/checks?check_run_id=21604156722
Since :patch transforms its inputs into context-only lines, we can easily get into a state where a file diff has only context lines. git apply does not accept a "diff" without any hunk, so let's skip that.