分类: LINUX
2017-11-09 14:03:58
git apply -v 33ae302.diff 提示 Skipped patch 'custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/TurnkeyUiMainActivity.java'.
但是目录和文件命名没有改动,怎么打不上去呢
vi 33ae302.diff
diff --git a/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/Tu
rnkeyUiMainActivity.java b/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/t
vcenter/nav/TurnkeyUiMainActivity.java
index be39f17..b3c8ed4 100644
--- a/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/TurnkeyUi
MainActivity.java
+++ b/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/TurnkeyUi
MainActivity.java
可见目录是
/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/Tu
rnkeyUiMainActivity.java b/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/t
vcenter/nav/TurnkeyUiMainActivity.java
而仓库的目录是android/n-cn/vendor/mediatek/open//custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/Tu
rnkeyUiMainActivity.java b/custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/t
vcenter/nav/TurnkeyUiMainActivity.java
所以
git apply --directory android/n-cn/vendor/mediatek/open 33ae302.diff
关于 –directory 的解释可以查看git apply –h
--directory
因为别人生成的patch目录不完整,所以我们要让patch加上目录前缀--directory android/n-cn/vendor/mediatek/open