Say I have a file A, which contains this:
a = 5
And a file B, like this:
b = 5
Now, it's obvious that diff will produce something like this (the patch):
1c1
< a = 5
---
> b = 5
Patching file A will obviously replace its contents with those of file B, resulting in file A containing
b = 5
What I want to do, however, is different. I want the contents of files A and B to merge, so that after patching file A it will contain
a = 5
b = 5
My case if course way more complex than my example but I think I've figured it out except for the summative diff/patch at the end.
tl;dr: I want the diff/patch to sum rather than replace the differences in the files. How can I do that?