Skip to content

diff: return the difference status in side-by-side mode - #291

Open
SichenLiang wants to merge 1 commit into
uutils:mainfrom
SichenLiang:side-by-side-exit-status
Open

SichenLiang wants to merge 1 commit into
uutils:mainfrom
SichenLiang:side-by-side-exit-status

Conversation

@SichenLiang

Copy link
Copy Markdown

The side-by-side renderer writes directly to stdout and returns no diff result to its caller. The caller treated that empty result as an identical comparison and exited 0 even when the rendered output contained differences.

Use the comparison result from the input files for the exit status. With -y -q, print only the brief message instead of rendering the side-by-side output.

Tests cover different and identical files, -y -q, and the 0, 1, and 2 exit statuses.

Fixes #290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

diff: return the difference status with -y

1 participant