dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
21.32k stars 358 forks source link

🚀 Show when a directory as a whole was renamed, instead of each file inside it #1717

Open Nemo157 opened 3 weeks ago

Nemo157 commented 3 weeks ago

When diffing a move of a large file tree the current output is very repetitive with every file individually listed. Given a small testcase (where I noticed this was with a ~220 file move):

> mkdir -p {left/foo,right/food}/{bar,baz,qux} && echo 'bar\nbar\nbar' | tee {left/foo,right/food}/bar/text >/dev/null && echo 'baz\nbaz\nbaz' | tee {left/foo,right/food}/baz/text >/dev/null && echo 'qux\nqux\nqux' > left/foo/qux/text && echo 'qux\nquack\nqux' > right/food/qux/text
> delta --no-gitconfig left right

image

It would be nice if this could just show the left/foo -> right/food directory rename, and highlight any few actually changed files within that.