From 2044019e67625ada0739c9a5ef0a36d8d40d1c79 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 19 Mar 2026 17:09:44 -0700 Subject: [PATCH] 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. --- gitconfig | 1 - zshrc | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 166a840..9afc7d4 100644 --- a/gitconfig +++ b/gitconfig @@ -23,7 +23,6 @@ [commit] verbose = true [diff] - external = difft algorithm = histogram mnemonicprefix = true renames = copies diff --git a/zshrc b/zshrc index fe822fc..990fb37 100755 --- a/zshrc +++ b/zshrc @@ -85,6 +85,10 @@ else export VISUAL="vi" fi +if is_interactive && command_exists difft; then + export GIT_EXTERNAL_DIFF="difft" +fi + if mac; then # Don't pollute tar archives with ._ files (Apple double files) export COPYFILE_DISABLE=true