git - `git config interactive.diffFilter diff-highlight`: the same diff by lines - and without color
问题描述
After git config --global interactive.diffFilter diff-highlight
my .gitconfig
:
# This is Git's per-user configuration file.
[user]
name = Vitaly Zdanevich
email = vitaly.zdanevich@xxx.com
[core]
excludesfile = /Users/vitaly/.gitignore_global
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process --skip
required = true
[diff]
tool = vimdiff
context = 20
[difftool]
prompt = false
[interactive]
diffFilter = diff-highlight
But in git commit -p
and git add -p
I see the same diff line-by-line without color in default terminal.app
:
Also I tried:
git -c interactive.diffFilter="git diff --color-words" add -p
And get:
fatal: mismatched output from interactive.diffFilter
hint: Your filter must maintain a one-to-one correspondence
hint: between its input and output lines.
My git version is 2.17.2 (Apple Git-113)
on macOS 10.14.1
from the official Command Line Tools, I prefer simplicity so not from the Brew.
解决方案
推荐阅读
- python - 如何从泡菜文件中仅加载选定的对象?
- html - Bootstrap 垂直对齐图像
- c# - 如何将 RegistryKey 对象存储为属性?
- graph - 使用 DFS 算法对有向图和无向图进行拓扑排序
- c# - 从表中获取实体列表会导致 500 错误 - 实体框架
- docker - 无法在私有注册表中授权 Openshift 服务帐户
- javascript - 为什么在console.log Javascript时reverseString打印未定义
- php - 我如何构建一个 db_select,-> 条件将一个字段与 drupal 中的值与 php 进行比较
- javascript - 将文本和选项移动到输入 html 和 jquery
- mysql - Mysql 临时文件排序问题