Bug#908993: diffoscope: use colour to highlight intra-line differences in the terminal output too

Paul Wise pabs at debian.org
Mon Sep 17 07:45:53 BST 2018

Package: diffoscope
Version: 101
Severity: wishlist

diffoscope uses colour to highlight intra-line differences in the HTML
output but the terminal output only does a colordiff-style output. It
would be nice if the terminal mode could highlight intra-line changes.

The package ccdiff contains a tool that can do intra-line difference
highlighting with `diff -u` style output, but it is written in Perl.

For example, diffoscope only highlights full lines:

$ diffoscope gtranscribe_0.7.1-2.dsc gtranscribe_0.8-1.dsc
--- gtranscribe_0.7.1-2.dsc
+++ gtranscribe_0.8-1.dsc
├── Build-Depends
│ @@ -1 +1 @@
│ -debhelper (>= 10), dh-python, python3-all, python3-dbus, python3-distutils-extra, python3-gi
│ +debhelper (>= 11), dh-python, python3-all, python3-dbus, python3-distutils-extra, python3-gi

$ ccdiff -u gtranscribe_0.7.1-2.dsc gtranscribe_0.8-1.dsc
-Build-Depends: debhelper (>= 10), dh-python, python3-all, python3-dbus, python3-distutils-extra, python3-gi
+Build-Depends: debhelper (>= 11), dh-python, python3-all, python3-dbus, python3-distutils-extra, python3-gi
                               \ Only this character is highlighted

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages diffoscope depends on:
ii  libpython3.6-stdlib    3.6.6-1
ii  python3                3.6.5-3
ii  python3-distro         1.3.0-1
ii  python3-distutils      3.6.6-1
ii  python3-libarchive-c   2.1-3.1
ii  python3-magic          2:0.4.15-2
ii  python3-pkg-resources  40.2.0-1

Versions of packages diffoscope recommends:
ii  abootimg                         0.6-1+b2
ii  acl                              2.2.52-3+b1
ii  apktool                          2.3.3-2
ii  binutils-multiarch               2.31.1-5
ii  bzip2                            1.0.6-9
ii  caca-utils                       0.99.beta19-2+b3
ii  colord                           1.3.3-2
ii  db-util                          5.3.1
ii  default-jdk [java-sdk]           2:1.10-68
ii  default-jdk-headless             2:1.10-68
pn  device-tree-compiler             <none>
pn  docx2txt                         <none>
ii  e2fsprogs                        1.44.4-2
ii  enjarify                         1:1.0.3-4
ii  fontforge-extras                 0.3-4
pn  fp-utils                         <none>
ii  genisoimage                      9:1.1.11-3+b2
ii  gettext                
ii  ghc                              8.2.2-4
ii  ghostscript                      9.25~dfsg-2
ii  giflib-tools                     5.1.4-3
ii  gnumeric                         1.12.41-1
ii  gnupg                            2.2.10-1
ii  imagemagick                      8:
ii  imagemagick-6.q16 [imagemagick]  8:
ii  jsbeautifier                     1.6.4-7
pn  libarchive-tools                 <none>
ii  llvm                             1:6.0-43
ii  lz4                              1.8.2-1
pn  mono-utils                       <none>
pn  odt2txt                          <none>
pn  oggvideotools                    <none>
ii  openjdk-10-jdk [java-sdk]        10.0.2+13-1
ii  openssh-client                   1:7.8p1-1
ii  pgpdump                          0.33-1
ii  poppler-utils                    0.63.0-2
pn  procyon-decompiler               <none>
ii  python3-argcomplete              1.8.1-1
ii  python3-binwalk                  2.1.2~git20180830+dfsg1-1
ii  python3-debian                   0.1.33
pn  python3-defusedxml               <none>
pn  python3-guestfs                  <none>
ii  python3-jsondiff                 1.1.1-2
ii  python3-progressbar              2.3-4
ii  python3-pyxattr                  0.6.0-2+b2
ii  python3-tlsh                     3.4.4+20151206-1+b4
pn  r-base-core                      <none>
ii  rpm2cpio                         4.14.1+dfsg1-4
ii  sng                              1.1.0-1+b1
ii  sqlite3                          3.24.0-1
ii  squashfs-tools                   1:4.3-6
ii  tcpdump                          4.9.2-3
ii  unzip                            6.0-21
ii  vim-common                       2:8.1.0320-1
pn  xmlbeans                         <none>
ii  xxd                              2:8.1.0320-1
ii  xz-utils                         5.2.2-1.3

Versions of packages diffoscope suggests:
ii  libjs-jquery  3.2.1-1

-- no debconf information



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20180917/8e60f426/attachment.sig>

More information about the Reproducible-builds mailing list