patch: tweaks
authorRob Landley <rob@landley.net>
Sun, 3 Oct 2010 22:49:48 +0000 (00:49 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Oct 2010 22:49:48 +0000 (00:49 +0200)
commit9d113cac425d7f496da4d7b6f309b707cedd6b61
treefbb6ba5da0145c5ebb9cd5fa960735778b0db917
parente2069fb325f598c81a37222c8e44436439757029
patch: tweaks

1) Eliminate spurious warnings about possibly reduced hunks.  Instead only
note a possible location if we don't find a non-reversed place to apply it.
(Otherwise, hunks that move code forward around within a file look reversed at
the removal site.)

2) Open the source file read-only, so we can apply patches to read-only files.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/patch.c