Hacker News new | past | comments | ask | show | jobs | submit login

Does it work properly with `git add -p`? That's a longstanding issue of diff-so-fancy: https://github.com/so-fancy/diff-so-fancy/issues/35



Yes it does. Thanks for asking, I hadn't tested this out. The key is the `--color-only` argument, which guarantees that, other than ANSI color escape sequences, the original output from git is unchanged:

  [interactive]
      diffFilter = delta --color-only


Looks like it works 'properly' in the sense that it does all that it can (colouring, incl. syntax highlighting, which d-s-f never does) without making the result wonky.

The core issue is the same for delta as it is for d-s-f (or any other interactive pager) - there must be a 1:1 correspondence between lines out from git, and lines back into it.

So, delta can do the fancier colouring interactively, but it can't mess with the header either, for the same underlying reason. (And so 'solved' it with a `--color-only` flag.)


It does not, but it seems like a popular request: https://github.com/dandavison/delta/issues/40




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: