Summary: | diff -N: loss of functionality | ||
---|---|---|---|
Product: | Base System | Reporter: | Roman Neuhauser <roman> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | cem, emaste, fnoyanisi, kevans |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Roman Neuhauser
2018-11-22 11:26:15 UTC
Is being able to use -N without -r the desired behaviour for diff(1)? From diff(1) man page, I understand that FreeBSD diff(1) requires the second file to be present in the directory where a recursive call starts but necessarily in the current working directory. FreeBSD man 1 diff -N --new-file If a file is found in only one directory, act as if it was found in the other directory too but was of zero size. man for GNU diff -N, --new-file treat absent files as empty A patch has been submitted (no reviewers yet) https://reviews.freebsd.org/D25081 A commit references this bug: Author: bapt Date: Mon Jun 1 09:09:37 UTC 2020 New revision: 361689 URL: https://svnweb.freebsd.org/changeset/base/361689 Log: 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> MFC after: 3 days Differential Revision: D25081 Changes: head/usr.bin/diff/diff.c head/usr.bin/diff/tests/diff_test.sh Fixed, thank you for reporting! sorry it took so long! 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 |