From e69867d43d4efd8887a6c8aa143e8f1bd3524957 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Sun, 29 Mar 2026 14:02:10 +0200 Subject: [PATCH] feat: use difftastic --- dot_gitconfig.tmpl | 1 + run_onchange_before_26_difftastic.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 run_onchange_before_26_difftastic.sh diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index 2451b62..abb184b 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -35,6 +35,7 @@ [diff] noprefix = true colorMoved = True + external = difft [commit] verbose = true [color "status"] diff --git a/run_onchange_before_26_difftastic.sh b/run_onchange_before_26_difftastic.sh new file mode 100644 index 0000000..19e2d6c --- /dev/null +++ b/run_onchange_before_26_difftastic.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euo pipefail + +INSTALL_DIR="${HOME}/.local/bin" +BINARY_NAME="difft" +TARBALL="difft-x86_64-unknown-linux-gnu.tar.gz" +DOWNLOAD_URL="https://github.com/Wilfred/difftastic/releases/latest/download/${TARBALL}" + +echo "Downloading difftastic..." +wget -q --show-progress -O "/tmp/${TARBALL}" "${DOWNLOAD_URL}" + +echo "Extracting..." +tar -xzf "/tmp/${TARBALL}" -C /tmp + +echo "Installing to ${INSTALL_DIR}..." +sudo mv "/tmp/${BINARY_NAME}" "${INSTALL_DIR}/${BINARY_NAME}" +sudo chmod +x "${INSTALL_DIR}/${BINARY_NAME}" + +echo "Cleaning up..." +rm -f "/tmp/${TARBALL}" + +echo "difftastic installed successfully!" +difft --version