A kernel diff generated by git diff v3.16..v3.17 cannot be applied correctly as patch <2.7 does not handle symlink creation correctly. An example part of the diff is: diff --git a/drivers/gpu/drm/nouveau/core/include/nvif/unpack.h b/drivers/gpu/drm/nouveau/core/include/nvif/unpack.h new file mode 120000 index 0000000..69d9929 --- /dev/null +++ b/drivers/gpu/drm/nouveau/core/include/nvif/unpack.h @@ -0,0 +1 @@ +../../../nvif/unpack.h \ No newline at end of file Reproducible: Always Steps to Reproduce: 1. Create a kernel tree at 3.16 2. Generate a diff from git from 3.16 to 3.17 with git diff v3.16..v3.17 3. Apply patch to 3.16 tree with patch -p1 < diff_file Actual Results: drivers/gpu/drm/nouveau/core/include/nvif/unpack.h is a normal file with contents ../../../nvif/unpack.h. Expected Results: drivers/gpu/drm/nouveau/core/include/nvif/unpack.h is created as a symbolic link to ../../../nvif/unpack.h The patch homepage http://savannah.gnu.org/forum/forum.php?forum_id=7361 indicates that release 2.7 should handle this correctly: "Support for most features of the "diff --git" format, including renames and copies, permission changes, and symlink diffs. Binary diffs are not supported yet; patch will complain and skip them." Performing the same operation with sys-devel/patch-2.7.1-r3 produces the correct result.