4

I am trying to apply a patch on Linux using patch -p1 < name_of_a_patch.patch

I get this line saying

patching file my_application.c
Hunk #1 succeeded at 96 (offset -27 lines)

And I see a file my_application.c.org

What does this mean?

  • Please format your posts correctly. – terdon May 17 '14 at 0:00
10

If the file to be patched has changed slightly since the patch was created, but the specific section remained the same, patch can detect that and apply the patch appropriately.

The message you see means the file was successfully patched, but the first section that was patched was 27 lines earlier than was originally specified.

  • does it need manual review or is it safe to assume that patch applied correctly ? – raj gupta Aug 4 '15 at 11:09
  • 4
    In my experience, the "succeeded" message always means the patch applied correctly. I assume that patch is smart enough to give me an error if there are any issues. – user55325 Aug 6 '15 at 2:39
  • But it's always a good idea to give a quick manual review. – Dilip Raj Baral Aug 18 '18 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.