daveewart / colordiff

Primary development for colordiff
http://www.colordiff.org/
GNU General Public License v2.0
177 stars 37 forks source link

Unified diff header is highlighted as changes #39

Closed joaoe closed 1 year ago

joaoe commented 6 years ago

Hi.

$ diff -u <(echo 1) <(echo 2) | colordiff

will interpret the lines like

#oldtext  # --- /dev/fd/63  2018-06-16 18:42:33.702021285 +0200
#newtext  # +++ /dev/fd/62  2018-06-16 18:42:33.702021285 +0200
#diffstuff# @@ -1 +1 @@
#oldtext  # -1
#newtext  # +2

The lines starting with 3 minus or pluses are all diff metadata or context. They are not removed nor added lines, so they should be styles with the diffstuff color.

Thank you.

joaoe commented 6 years ago

Ok, I tested with the version in master and it actually works correctly. Sorry for the noise.

gedge commented 2 years ago

has this returned?

daveewart commented 2 years ago

Just looking at this now.

daveewart commented 2 years ago

I believe fixed in latest master: please verify @gedge

gedge commented 2 years ago

@daveewart - looks fixed to me, many thanks

(next time, I'll submit a PR, promise!)