6

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?

1
  • Please format your posts correctly.
    – terdon
    Commented May 17, 2014 at 0:00

1 Answer 1

13

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.

3
  • does it need manual review or is it safe to assume that patch applied correctly ?
    – raj gupta
    Commented Aug 4, 2015 at 11:09
  • 5
    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
    Commented Aug 6, 2015 at 2:39
  • But it's always a good idea to give a quick manual review. Commented Aug 18, 2018 at 9:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .