apply: refactor `git apply` option parsing