diff-so-fancy icon indicating copy to clipboard operation
diff-so-fancy copied to clipboard

Diff coloring of each file is good but the diff coloring with 2 files seems broken

Open utix opened this issue 2 years ago • 3 comments

Images to show the issues: image

image

The diffs are quite simple

raw diff

diff --git a/ci/images/ubuntu-dind/install.sh b/ci/images/ubuntu-dind/install.sh
index 554923f549..a5049b156c 100644
--- a/ci/images/ubuntu-dind/install.sh
+++ b/ci/images/ubuntu-dind/install.sh
@@ -12,3 +12,14 @@ node --version
 # Install Chrome browser and Cypress
 curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb
 dpkg -i /chrome.deb || apt-get install -yf
+
+# Install postgresql and prepare it for application
+apt -y install vim bash-completion wget
+apt-get install -y locales
+sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
+apt-get update
+
+locale-gen en_US.UTF-8
+
+apt-get install postgresql-14 postgresql-contrib-14 -y
diff --git a/ci/utils/installers/database/install-postgre.sh b/ci/utils/installers/database/install-postgre.sh
index 26091d71e1..77ed86c8af 100755
--- a/ci/utils/installers/database/install-postgre.sh
+++ b/ci/utils/installers/database/install-postgre.sh
@@ -1,16 +1,3 @@
 #!/bin/bash
 
-# /!\ Only use it in image based on a distribution that provides apt as package manager
-
-# Install postgresql and prepare it for application
-apt update
-apt -y install vim bash-completion wget
-apt-get install -y locales
-sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
-wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
-apt-get update
-
-locale-gen en_US.UTF-8
-
-apt-get install postgresql-14 postgresql-contrib-14 -y
 pg_ctlcluster 14 main start

Git conf

[pager]
        color = true
  diff = diff-so-fancy | less --tabs=4 -RFX
  show = diff-so-fancy | less --tabs=4 -RFX
[diff]
    color = auto
    algorithm = histogram
    colorMoved = dimmed-zebra
[diff "color"]
        meta = green
        frag = yellow
        old = magenta
        new = cyan
        whitespace = red reverse
[color "diff-highlight"]
        oldNormal = red
        oldHighlight = 9 ul 52
        newNormal = green
        newHighlight = 10 ul 22

utix avatar Feb 16 '23 21:02 utix

diff.txt

utix avatar Feb 17 '23 07:02 utix

The problem seems to come from diff-highlight itself

image

utix avatar Feb 17 '23 08:02 utix

Do you have colorMoved=zebra or dimmed-zebra?

HaleTom avatar Jun 28 '23 13:06 HaleTom

This issue has been stale for a while. However, I'm seeing the same issue. Are there any plans to address this?

dcervenkov avatar Apr 12 '24 08:04 dcervenkov

Since the issue is present with plain diff-highlight, there's not really anything for dsf to do here - suggest you check/report in git's bug tracker.

OJFord avatar Apr 12 '24 09:04 OJFord