Reports, patches & command line
Ways to get a comparison out of Diffy: a report to send someone, a patch to apply, or an exit code for a script.
HTML report Pro
⋯ → Export HTML report… saves the current comparison as a single .html file: both sides, line numbers and highlighting, with the options used (XML-aware, whitespace mode) noted at the top. It is self-contained — no images or scripts to keep alongside — so it can be attached to an email or ticket and opened in any browser.
Unified patch Pro
⋯ → Export unified patch… writes a standard .patch file that git apply and patch understand. Each file's own line endings are kept (CRLF stays CRLF), and a missing final newline is marked the way git expects. With XML-aware on, the patch describes the reformatted XML, which is rarely what you want to apply — turn it off first.
Opening files from a terminal
Installing from the Store adds a command for each edition: diffy for Diffy and diffypro for Diffy Pro. Pass two paths to open them compared, Original first:
diffy "C:\exports\menu_old.vxml" "C:\exports\menu_new.vxml"
If the command is not found, check that the alias is switched on under Windows Settings → Apps → Advanced app settings → App execution aliases.
Headless compare
Add --diff and Diffy compares without opening a window, then exits with a code a script can test:
0 | The files are the same (under the options given). |
1 | They differ. |
2 | Something went wrong: a missing or binary file, a bad option, or an output file that could not be written. |
diffypro --diff old.xml new.xml --xml --ws all
diffypro --diff old.xml new.xml --patch changes.patch
diffypro --diff old.xml new.xml --report report.html
--ws MODE | Whitespace: off (default), amount, trim or all. |
--xml | XML-aware compare. |
--algo NAME | histogram (default), patience or classic. |
--patch FILE | Write a unified patch. |
--report FILE | Write an HTML report. |
The free edition runs --diff with --ws off or amount and the default algorithm. The other options are Diffy Pro, and asking for them exits with code 2.
Diffy is a windowed app, so it prints nothing to the console — the exit code and the files it writes are the result. Command Prompt does not wait for windowed apps by default; use start /wait to get the code:
start /wait diffypro --diff old.xml new.xml
echo %errorlevel%
git difftool
To have git difftool open each changed file in Diffy:
git config --global difftool.diffy.cmd "diffypro \"$LOCAL\" \"$REMOTE\""
git config --global diff.tool diffy
git config --global difftool.prompt false
Use diffy in the first line for the free edition. Then git difftool HEAD~1 opens every file changed in the last commit, one after another. Git's older version ($LOCAL) lands as Original and your working copy as Modified. Diffy is a two-way tool, so it is not set up as a mergetool.