I've never used maintained files created with patch and diff. But what is the work flow when the patch drifts? As in this case. I can see the the failures when I do -m in the same format git would provide for resolution. But how can I, after I fix the problems, regenerate the patch with all the same information (notes and comments).

  • 1
    What exactly do you mean with "notes and comments". I looked at a patch created by git. There are additional information about a patch with hashes, commit message, git version, etc. Even if you manage to add some additional info to patch file, I do not think you can get a git hash. I would suggest just to use diff against previous version before patching and fixing the problems. You can apply that patch and then commit the changes with git. I guess you already knew that.
    – nobody
    Feb 25 at 7:35

You can use diff --unified file.orig file after a patch --merge to create a new patch file based on the changed file without git. It won't have the same information, though.

  • Yep, I just found it. That was exactly what I need --unified on the diff. Feb 25 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.