When a file's mode is changed, git diff will emit lines in between the diff --git a/path b/path line and the index hash1..hash2 line that shows the mode change. Unfortunately delta discards this entire header, including the mode change. Using --color-only or --diff-highlight preserves these lines, but otherwise they get removed.
This is rather annoying as the mode changes are actually important.
git diff --no-pager output:
diff --git a/tools/is_ci.tcl b/tools/is_ci.tcl
old mode 100644
new mode 100755
index d984ab2c65..d047b92be6
--- a/tools/is_ci.tcl
+++ b/tools/is_ci.tcl
@@ -6,10 +6,10 @@ namespace import util::*
proc usage {} {
return "usage: [file tail $::argv0] \[-q]
-
+
Options:
-q --quiet Suppress all output.
-
+
Description:
Checks if the script was invoked from within a CI environment. If so, prints
'yes', otherwise prints 'no'.
delta --no-gitconfig output (sans color):
tools/is_ci.tcl
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
namespace import util::* โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
6
proc usage {} {
return "usage: [file tail $::argv0] \[-q]
Options:
-q --quiet Suppress all output.
Description:
Checks if the script was invoked from within a CI environment. If so, prints
'yes', otherwise prints 'no'.
This was reproduced with delta 0.4.3.
Thanks @lilyball, I agree -- we should include mode change info by default. What do you think about displaying this as
tools/is_ci.tcl (100644 โถ 100755)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
?
Most helpful comment
Thanks @lilyball, I agree -- we should include mode change info by default. What do you think about displaying this as
?