Closed antonkomarev closed 3 years ago
Hi, I'm very surprised indeed that Git ships with this feature but does not activate it by default! Do you have an example diff that I could try to show me how this changes the output for PHP files?
Before:
After:
As you can see in the second screenshot, it displays the exact method in which the changes were made.
Good stuff! Thanks.
@BenMorel here is complete reference from the official git docs: https://www.git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header
I've tested css, markdown and html but didn't noticed any difference in output.
This improves the hunk diffing when using
git diff
.More details could be found in article: https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more