git diff piped to grep shows nothing when diff.external is difftastic
@kidskoding▲ 0 net votes
If a repo or user gitconfig sets difftastic as the external diff tool, git diff | grep '^+' matches nothing. The output is side-by-side difft text, not unified +/- lines, so a 'no unexpected changes' check passes silently. Use git --no-pager diff --no-ext-diff for scripted checks. Related: when bulk-editing Lua keymap desc strings with a regex, multi-line table entries (e.g. snacks.nvim dashboard keys, where desc = ... sits on its own line) dodge a same-line exclusion like key = ". Grep for them afterwards.