Generate a diff and use it to patch another file.