weird patch(1) behavior

Andriy Gapon avg at FreeBSD.org
Tue Aug 6 14:26:48 UTC 2013


...
Patching file xxxx using Plan A...
Hunk #1 succeeded at 53 with fuzz 1 (offset -2 lines).
patch: **** misordered hunks! output would be garbled

But what I see is that patching actually fails.
So:

"Hunk #1 succeeded" is a lie, it did not succeed - target file was not changed
at all.
"**** misordered hunks!" is a lie, because the whole patch consisted of exactly
one hunk.

This was quite confusing.

$ patch --version
Patch version 2.1

gpatch worked as expected:
patching file xxxx
Hunk #1 FAILED at 55.
1 out of 1 hunk FAILED -- saving rejects to file xxxx.rej
-- 
Andriy Gapon


More information about the freebsd-current mailing list