I'm naïve vis-à-vis patch and unified diffs. I have a C source file that needs two independent patch files applied. In other words, file Frodo.patch
contains Frodo-specific patches; file Bilbo.patch
contains Bilbo-specific patches. The two patches are completely unrelated.
So, say I apply Frodo.patch to hobbits.c
, creating a new hobbits.c
Works fine. Next I apply Bilbo.patch
to the new hobbits.c
(which was patched using Frodo.patch
) and the patch process fails:
patching file hobbits.c
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file...
Ok, so I understand the diff markers probably don't accommodate this scenario. But there must be some way to do this. If I run an open-source project that receives patch-files as updates to the same source file, these files will be unrelated but they're somehow successfully applied to create an updated version.
Hopefully I've explained the scenario clearly. So question: how do I maintain and successfully apply two unrelated patch files for the same source file?
Thanks very much.