Use difft with git via GIT_EXTERNAL_DIFF instead of gitconfig

Sometimes tools don't pass --no-ext-diff and difft can be very slow
and/or break tools that don't expect its output.
This commit is contained in:
Sami Samhuri 2026-03-19 17:09:44 -07:00
parent ae9b658f1c
commit 2044019e67
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -23,7 +23,6 @@
[commit] [commit]
verbose = true verbose = true
[diff] [diff]
external = difft
algorithm = histogram algorithm = histogram
mnemonicprefix = true mnemonicprefix = true
renames = copies renames = copies

4
zshrc
View file

@ -85,6 +85,10 @@ else
export VISUAL="vi" export VISUAL="vi"
fi fi
if is_interactive && command_exists difft; then
export GIT_EXTERNAL_DIFF="difft"
fi
if mac; then if mac; then
# Don't pollute tar archives with ._ files (Apple double files) # Don't pollute tar archives with ._ files (Apple double files)
export COPYFILE_DISABLE=true export COPYFILE_DISABLE=true