如何在执行`git diff --color`的同时执行不区分大小写的git diffing? [英] How can I do case insensitive git diffing while also doing `git diff --color`?
本文介绍了如何在执行`git diff --color`的同时执行不区分大小写的git diffing?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在执行 git diff --color-words
时忽略大小写 git diff
?或者我需要在执行 git diff --color-words
?
Is it possible to do a case insensitive git diff
while also doing git diff --color-words
? Or do I need to use an external diff program while doing git diff --color-words
?
时使用外部差异程序:如果你想要的只是git diff不区分大小写,请转到此问题如何在Git中执行不区分大小写的比较) p>
( note: if all you want is git diff case insensitive please go to this question How to perform case insensitive diff in Git )
推荐答案
GIT_EXTERNAL_DIFF='diff -ipu "$2" "$5" #' git diff --ext-diff
或者,在没有#hack的情况下使用更好的方式:
Or, in a nicer fashion without the # hack I used there:
echo 'diff -ipu "$2" "$5"' >myscript; chmod a+x myscript;
GIT_EXTERNAL_DIFF='./myscript' git diff --ext-diff
我同意如果git-diff只会有一个 -i
选项...
I agree it would be nicest if git-diff would just have an -i
option...
这篇关于如何在执行`git diff --color`的同时执行不区分大小写的git diffing?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文