Skip to content

Commit

Permalink
Make patdiff show refined diffs
Browse files Browse the repository at this point in the history
Refined diffs are the whole point of patdiff!

Signed-off-by: Jesse Haber-Kucharsky <jesse@haber-kucharsky.com>
  • Loading branch information
hakuch committed Feb 18, 2021
1 parent 0831f39 commit 4b296fa
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/dune_engine/print_diff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,12 @@ let print ?(skip_trailing_cr = Sys.win32) path1 path2 =
| Some prog ->
let* () =
Process.run ~dir ~env:Env.initial Strict prog
[ "-keep-whitespace"
; "-location-style"
; "omake"
; ( if Lazy.force Ansi_color.stderr_supports_color then
"-unrefined"
( [ "-keep-whitespace"; "-location-style"; "omake" ]
@ ( if Lazy.force Ansi_color.stderr_supports_color then
[]
else
"-ascii" )
; file1
; file2
]
[ "-ascii" ] )
@ [ file1; file2 ] )
in
(* Use "diff" if "patdiff" reported no differences *)
normal_diff () )

0 comments on commit 4b296fa

Please sign in to comment.