File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed
test/blackbox-tests/test-cases/promote Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1+ - Revert the change in behavior of ` --diff-command ` back to 3.21. Non-existent
2+ files are now passed to this command instead of being replaced with /dev/null
3+ (#14098 , fixes 13891, @rgrinberg )
Original file line number Diff line number Diff line change @@ -177,8 +177,6 @@ let prepare_with_labels
177177 (Path. to_string_maybe_quoted (Path. drop_optional_sandbox_root path2))
178178 ])
179179 in
180- let path1 = noent_to_dev_null path1 in
181- let path2 = noent_to_dev_null path2 in
182180 match ! Clflags. diff_command with
183181 | Some "-" -> fallback
184182 | Some cmd ->
@@ -213,17 +211,28 @@ let prepare_with_labels
213211 | None -> fallback
214212 | Some diff -> With_fallback. run diff ~fallback
215213 in
214+ let builtin_path1 = noent_to_dev_null path1 in
215+ let builtin_path2 = noent_to_dev_null path2 in
216216 let diff =
217- External. diff ~skip_trailing_cr ~dir promotion loc (label1, path1) (label2, path2)
217+ External. diff
218+ ~skip_trailing_cr
219+ ~dir
220+ promotion
221+ loc
222+ (label1, builtin_path1)
223+ (label2, builtin_path2)
218224 in
219225 if Execution_env. inside_dune
220226 then or_fallback ~fallback diff
221227 else (
222228 let fallback =
223- Option. first_some (External. git ~skip_trailing_cr promotion loc path1 path2) diff
229+ Option. first_some
230+ (External. git ~skip_trailing_cr promotion loc builtin_path1 builtin_path2)
231+ diff
224232 |> or_fallback ~fallback
225233 in
226- External. patdiff ~dir promotion loc path1 path2 |> or_fallback ~fallback )
234+ External. patdiff ~dir promotion loc builtin_path1 builtin_path2
235+ |> or_fallback ~fallback )
227236;;
228237
229238let prepare ~skip_trailing_cr promotion path1 path2 =
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ dune promote should be able to promote into directories that don't exist
1818
1919 $ dune build ./foo --diff-command "$SHELL $PWD /diff .sh "
2020 File "dir /foo ", line 1 , characters 0-0 :
21- a : / dev / null
21+ a : dir / foo
2222 b : foo
2323 [1 ]
2424
You can’t perform that action at this time.
0 commit comments