Good grief... my family yelled at me for being mean... so I'm sorry if I hurt your feelings...
I'm pretty sure that he's not able to see any way that something as "simple" as patch and diff can work, but *shrug* doesn't matter to me.
I understand that it "can" work, but only if you're lucky and the stars align. I was just trying to point out that you don't tend to get the results you want when you apply a patch created from two files to a third.
The reality is that the third file is going to be different, in ways that can't be predicted. Patch isn't intended to be used in this manner. Go back and re-read the description you posted. The third file isn't an original file. That's why it isn't working.
I believe the problem is that he changed stuff that was within the context of the patch...
Yes, that was me trying to point out that you really don't know what is going to change, so again, applying a patch made with two files and applying to a third isn't a good idea.
The change I made to make your approach fail wasn't something that will never happen in real life. If you take a look at "git whatchanged -p config.php-dist" you'll see that config.php-dist does change, and using diff and patch in the manner in which you are using them isn't going to work reliably.
If you can get diff and patch to work more reliably than the approach I took, I'll be the first to admit I'm wrong - but having the patch fail and putting out an error message that you need to fix it manually isn't a better approach.