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:
Enji Cooper 2017-07-17 17:36:04 +00:00
parent c7af789360
commit 4d8c579095

View File

@ -1115,7 +1115,7 @@ restart:
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;
}