Helping patch find close matches. Applying Patches with Changed White Space Sometimes mailers, editors, or other programs change spaces into tabs, or vice versa. If this happens to a patch file or an input file, the files might look the same, but patch will not be able to match them properly. Each line of the context must still match a line in the input file. Sometimes people run diff with the new file first instead of second.
Rejects come out in the swapped format.
Often patch can guess that the patch is reversed. If the first hunk of a patch fails, patch reverses the hunk to see if it can apply it that way. But most patches add or change lines rather than delete them, so most reversed normal diffs begin with a delete, which fails, and patch notices. If you apply a patch that you have already applied, patch thinks it is a reversed patch and offers to un-apply the patch. This could be construed as a feature.