On Fri, Feb 10, 2017 at 11:20:59AM -0800, Nick Desaulniers wrote: > I frequently need to backport patches from the Linux kernel to older > kernel versions (Android Security). My usual workflow for simple > patches is: > > 1. try `git am patch.txt`. This is not exactly an answer to your question, but "git am -3" is often a better solution than trying to fuzz patches. It assumes the patches are Git patches (and record their origin blobs), and that you have that blob (which should be true if the patches are based on the normal kernel history, and you just fetch that history into your repository). I've found that this often manages to apply patches that "git apply" will not by itself. And I also find the resulting conflicts to be much easier to deal with than patch's ".rej" files. -Peff