git-apply: improve error detection and messages