git apply, you first generate a patch file with
git format-patch. However, sometimes you want to send a quick diff to someone with
git diff FILE | pbcopy.
git applywill give a "corrupt patch" error, because
git diffdoesn't give the trailing newline that
git format-patchdoes. We can fix this by wrapping in