Mike Hommey [off-list ref] writes:
This will allow to extend the read logic further. We also return a better
error message than usage() when the given filename can't be opened, and
avoid whitespace options not being set when reading from stdin with the
"-" argument as a side effect.
I think this is a good clean-up, but I suspect that apply_patch() should
be further refactored to take strbuf, instead of <fd, filename>
(original) or <filename> (yours).