apply: check git diffs for invalid file modes