so-fancy / diff-so-fancy

Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
MIT License
17.39k stars 335 forks source link

Better graphical separation of different commits #368

Open bruce-ricard opened 4 years ago

bruce-ricard commented 4 years ago

I recently started using diff-so-fancy. I really like the way new files are being shown. I used to miss them when scrolling quickly even with diff-highlight, that doesn't happen anymore.

What happens to me now is that I miss the beginning of a new commit when running a command like git log -p.

Suggestion: similarly to how files are shown like:

______________________________________...
file.txt:123
______________________________________...

could commits look like:

******************************************************...
******************************************************...
commit 123abc...
author: Donald Knuth
Commit Title
* commit
* description
******************************************************...
******************************************************...
______________________________________...
file.txt:123
______________________________________...
file.txt diffs

______________________________________...
file2.txt:123
______________________________________...
file2.txt diffs

******************************************************...
******************************************************...
commit 123abd...
author: Genghis Khan
Commit Title
* commit
* description
******************************************************...
******************************************************...
______________________________________...
file.txt:123
______________________________________...
file.txt diffs

______________________________________...
file2.txt:123
______________________________________...
file2.txt diffs

The rationale behind it is: file diffs and part of a commit. Hence the graphical representation of a commit should be "larger" than the one for each file. Similarly to how "Title1" is often displayed in a larger font than "Title2", in docs for example.

Cheers.

ericbn commented 3 years ago

I have a suggestion for this in https://github.com/so-fancy/diff-so-fancy/pull/398

Svalorzen commented 1 month ago

Hello, I have just updated #398 with a new PR #497, which rebases the original one to the current next so that it can be merged without conflicts. I have tested it on my machine and it seems to still work well.

I think it would be a shame to let all the work done by @ericbn go to waste, so I'm writing hoping that the PR can be merged as it seems to be a really useful addition when examining lists of commits.

Perhaps @scottchiefbaker could look into it?