Skip to content

Commit c71c565

Browse files
committed
Make patdiff show refined diffs
Refined diffs are the whole point of patdiff! Signed-off-by: Jesse Haber-Kucharsky <jesse@haber-kucharsky.com>
1 parent 0831f39 commit c71c565

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased
22
----------
33

4+
- Make `patdiff` show refined diffs (#4257, fixes #4254, @hakuch)
5+
46
- Allow `(package pkg)` in dependencies even if `pkg` is an installed package
57
(#4170, @bobot)
68

src/dune_engine/print_diff.ml

+5-9
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,12 @@ let print ?(skip_trailing_cr = Sys.win32) path1 path2 =
8989
| Some prog ->
9090
let* () =
9191
Process.run ~dir ~env:Env.initial Strict prog
92-
[ "-keep-whitespace"
93-
; "-location-style"
94-
; "omake"
95-
; ( if Lazy.force Ansi_color.stderr_supports_color then
96-
"-unrefined"
92+
( [ "-keep-whitespace"; "-location-style"; "omake" ]
93+
@ ( if Lazy.force Ansi_color.stderr_supports_color then
94+
[]
9795
else
98-
"-ascii" )
99-
; file1
100-
; file2
101-
]
96+
[ "-ascii" ] )
97+
@ [ file1; file2 ] )
10298
in
10399
(* Use "diff" if "patdiff" reported no differences *)
104100
normal_diff () )

0 commit comments

Comments
 (0)