Don't emit "diff: diff <options> arguments" when diffing files if

-q is specified.

This improves compatibility with GNU diff.

Found by accident with `diff -Nrq /usr/tests /usr/tests.new | grep Kyuafile`.

MFC after:	2 months
Relnotes:	yes
This commit is contained in:
ngie 2017-07-17 17:36:04 +00:00
parent a9d5e2394e
commit e066de4be4

View File

@ -1115,7 +1115,7 @@ change(char *file1, FILE *f1, char *file2, FILE *f2, int a, int b, int c, int d,
return;
}
proceed:
if (*pflags & D_HEADER) {
if (*pflags & D_HEADER && diff_format != D_BRIEF) {
diff_output("%s %s %s\n", diffargs, file1, file2);
*pflags &= ~D_HEADER;
}