2011年6月8日 星期三

diff , ignore white space

如果有人改了 white space 的數量,或是以 white space 來代替 tab, diff 的結果就會一團亂。

這時候可以下
git diff -w
來忽略 white space.

如果是在 difftool 模式 (invoke vimdiff),就要在 vi 裡下 command:
:set diffopt+=iwhite



ref: http://stackoverflow.com/questions/1265410/is-there-a-way-to-configure-vimdiff-to-ignore-all-whitespaces

ref: http://myvicommandhelp.blogspot.com/2011/06/diff-ignore-white-space.html