git diff或者打patch时,经常会碰到如下提示:
Applying: set EMMC_BOOT_P2=1 to boot from eMMC partition 2
.git/rebase-apply/patch:33: trailing whitespace.
NOTICE("eMMC boot from partition1...\n");
.git/rebase-apply/patch:39: trailing whitespace.
NOTICE("eMMC boot from partition2...\n");
.git/rebase-apply/patch:79: trailing whitespace.
NOTICE("eMMC boot from partition2 now...\n");
.git/rebase-apply/patch:85: trailing whitespace.
NOTICE("boot from hyperflash...\n");
出现上述现象的原因:存在大量的行尾空格 或者 换行后编译器智能添加的空行(没有写任何代码)
这时,可以在vscode中,安装如下扩展插件——Trailing Spaces:
然后,通过菜单进入Settings设置:
可以设置如下: