[git version 1.7.9.5]
1. 准备打patch,出现如下patch failed
git am ../../xxx/patch/*.patch
Applying: Audio: Configure done
Applying: supports play
error: patch failed: drivers/xxx/dev/audio.c:15
error: drivers/xxx/dev/audio.c: patch does not apply
Patch failed at 0003 : supports play
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
2. 先patch一些可以成功的patch,然后针对错误的文件进行修改
git am ../patch/20150202/0003-supports-play.patch --reject
Applying: supports play
Checking patch arch/arm/configs/xxx_defconfig...
Hunk #1 succeeded at 2686 (offset -1 lines).
Checking patch drivers/xxx/dev/Kconfig...
Checking patch drivers/xxx/dev/Makefile...
Checking patch drivers/xxx/dev/audio.c...
error: while searching for:
module_param_named(debug, g_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP);
......
error: patch failed: drivers/xxx/dev/audio.c:15
Applied patch arch/arm/configs/xxx_defconfig cleanly.
Applied patch drivers/xxx/dev/Kconfig cleanly.
Applied patch drivers/xxx/dev/Makefile cleanly.
Applying patch drivers/xxx/dev/audio.c with 1 rejects...
Rejected hunk #1.
Patch failed at 0001: supports play
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
3. 修改好后,提交patch,index和commit保持
修改patch失败的文件drivers/xxx/dev/audio.c,
#git add .
#git am --resolved
阅读(2662) | 评论(0) | 转发(0) |