Force git diff
to use delta?
#840
-
I'm trying to essentially just call Tried: a bunch of different stuff on the node side: sindresorhus/execa#485 |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
I'm thinking this might be a little bit like TTY/color stuff. If you want to force I don't if git is failing to call |
Beta Was this translation helpful? Give feedback.
-
Hi @devinrhode2. git only invokes its pager (that's Unfortunately git doesn't seem to have an option like
|
Beta Was this translation helpful? Give feedback.
-
While (1) is the most correct/portable, (2)'s probably the easiest to do as a quick proof of principle, i.e. something like
|
Beta Was this translation helpful? Give feedback.
-
I ended up just breaking up my node script into two stages: node ./shell-scripts/pre-commit/stage1.mjs;
cat .pre-commit-cache/.git-auto-stage-files-to-diff | PAGER=cat git diff
node ./shell-scripts/pre-commit/stage2.mjs; This is good for others not using |
Beta Was this translation helpful? Give feedback.
-
Hi, I wanted to do this as well to integrate my plugin with delta. I asked a question on the git mailing list and got a response (https://lore.kernel.org/git/20230816025715.GB2248431@coredump.intra.peff.net/T/#t). The tldr of their recommendation is to ask users to use |
Beta Was this translation helpful? Give feedback.
While (1) is the most correct/portable, (2)'s probably the easiest to do as a quick proof of principle, i.e. something like