https://stackoverflow.com/questions/987372/what-is-the-forma...
https://stackoverflow.com/questions/987372/what-is-the-forma...
If so, then that is likely an easy answer. No one creates patch files by hand, they are created by diff (or similar tools).
And diff, at least the Unix variant, is used to compare two files and produce an output that will change the first of the two into the second of the two (i.e., it outputs the 'differences' between the two files, hence the utility's name 'diff').
Well, to have two files, one of the files has to be given a different name. So if one is editing a single file, and is not using some kind of source control system that tracks changes, it is common to first do:
cp file_to_be_edited file_to_be_edited.old
Then, edit "file_to_be_edited".Then produce a patch by doing:
diff -u file_to_be_edited.old file_to_be_edited > file_to_be_edited.diff
And since diff puts the filenames of the two files it compares into the header lines of the output unified diff format, you get a file named .old showing up in the output patch file.Maybe younger developers don't know this experience because usually their patches are generated by git diff and the like. But before that stuff was as common as today, you would need to copy the old files off somewhere to generate a patch. At that point you need to name it something.