| Summary: | [patch] diff(1) --label not honoured for "print_status" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jamie Landeg-Jones <jamie> | ||||
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Some People | CC: | bapt, emaste, jamie, kevans | ||||
| Priority: | --- | Keywords: | patch | ||||
| Version: | CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
CC'ing myself and bapt@ Hi. Any chance this will make it into 12.2? Cheers The patch looks trivial enough to me; as a style nit, we'll want to push the path1/path2 assignments off to the next line, but this can be done pre-commit. I'll coordinate with bapt@, but given the length of time between here and 12.2 it will certainly be there. Thanks for the info, Kyle! And sorry for the style formatting - I don't know how I managed to not notice that when submitting! Cheers, Jamie A commit references this bug: Author: bapt Date: Mon Jun 1 09:01:14 UTC 2020 New revision: 361688 URL: https://svnweb.freebsd.org/changeset/base/361688 Log: Restore compatibility with GNU diff regarding --label Various options to "diff(1)" show filenames, and traditionally make use of the "--label" parameter, if set. Restore this behaviour in BSD diff. While here add a regression test PR: 244533 Submitted by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 3 days Changes: head/usr.bin/diff/diff.c head/usr.bin/diff/tests/diff_test.sh Thanks for reporting and sorry for the delay (In reply to Baptiste Daroussin from comment #6) MFC in time for 12.2? :-) Cheers A commit references this bug: Author: bapt Date: Sat Sep 19 20:15:52 UTC 2020 New revision: 365914 URL: https://svnweb.freebsd.org/changeset/base/365914 Log: MFC r361688-r361690, r365041 r361688: Restore compatibility with GNU diff regarding --label Various options to "diff(1)" show filenames, and traditionally make use of the "--label" parameter, if set. Restore this behaviour in BSD diff. While here add a regression test PR: 244533 Submitted by: Jamie Landeg-Jones <jamie@catflap.org> r361689: diff: restore compatibility with GNU diff regarding -N option When -N is used the missing files are treated as empty. PR: 233402 Submitted by: Fehmi Noyan Isi <fnoyanisi@yahoo.com> Reported by: Roman Neuhauser <roman@sigpipe.cz> Differential Revision: D25081 r361690: Document long version of -b option PR: 234195 Submitted by: Fehmi Noyan Isi <fnoyanisi@yahoo.com> Reported by: Andras Farkas <deepbluemistake@gmail.com> r365041: diff: always properly kill pr(1) When diff is invoked with -l it will spawn the pr(1) program. In some circumpstances the pr(1) was not properly killed when diff program exits. Submitted by: Bret Ketchum Differential Revision: https://reviews.freebsd.org/D26232 Changes: _U stable/12/ stable/12/usr.bin/diff/diff.1 stable/12/usr.bin/diff/diff.c stable/12/usr.bin/diff/diffreg.c stable/12/usr.bin/diff/tests/diff_test.sh |
Created attachment 212065 [details] patch to restore -label functionality Various options to "diff(1)" show filenames, and traditionally make use of the "--label" parameter, if set. The BSD diff supports --label for unified and context diffs, but doesn't for these other cases. GNU diff, as previously installed in base did: % diff --label hello --label world -s /COPYRIGHT /COPYRIGHT Files /COPYRIGHT and /COPYRIGHT are identical % gdiff --label hello --label world -s /COPYRIGHT /COPYRIGHT Files hello and world are identical % diff --label hello --label world /bin/ls /bin/pwd Binary files /bin/ls and /bin/pwd differ % gdiff --label hello --label world /bin/ls /bin/pwd Binary files hello and world differ etc. The attached patch restores the previous behaviour. Cheers, Jamie