|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
bda949b6 |
| 22-Aug-2021 |
Piotr Pawel Stefaniak <[email protected]> |
diff: read whole files to determine if they are ASCII text
Before this change, only the first BUFSIZE bytes were checked.
(cherry picked from commit 3cbf98e2bee91db9ed9118ff557e02cdd449f49a)
|
| #
ece58f7a |
| 22-Aug-2021 |
Piotr Pawel Stefaniak <[email protected]> |
diff: don't output carriage returns that were stripped on input
--strip-trailing-cr worked as intended for comparison between files, but the characters were still present in final output.
(cherry p
diff: don't output carriage returns that were stripped on input
--strip-trailing-cr worked as intended for comparison between files, but the characters were still present in final output.
(cherry picked from commit af2f0164318455433db95adce07af829285b78ad)
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
108633bb |
| 03-Feb-2021 |
Olivier Cochard <[email protected]> |
diff: Use unprivileged_user with report_identical test
Approved by: bapt Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28466
(cherry picked from commit b67df8d7c203a139b
diff: Use unprivileged_user with report_identical test
Approved by: bapt Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28466
(cherry picked from commit b67df8d7c203a139b5afbe72e1947fbb8c32dc73)
show more ...
|
| #
07d72ca9 |
| 26-Jan-2021 |
Baptiste Daroussin <[email protected]> |
diff: add a test case about the non regular file support
(cherry picked from commit c440e7870a020546ad241848e2ff8e9cb27a3073)
|
| #
0702bf9c |
| 25-Jan-2021 |
Baptiste Daroussin <[email protected]> |
diff: add a test case for failed -s option
(cherry picked from commit 13860e71eb501f498a2263f44ea9244f6830b61c)
|
| #
12a8d302 |
| 09-Jan-2021 |
Ed Maste <[email protected]> |
diff: honour flags with -q
Previously -q (just print a line when files differ) ignored flags like -w (ignore whitespace). Avoid the D_BRIEF short-circuit when flags are in effect.
PR: 252515 Repo
diff: honour flags with -q
Previously -q (just print a line when files differ) ignored flags like -w (ignore whitespace). Avoid the D_BRIEF short-circuit when flags are in effect.
PR: 252515 Reported by: Scott Aitken Reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28064
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
ac05de17 |
| 30-Jul-2020 |
Kyle Evans <[email protected]> |
diff: fix side_by_side after r363679
It's currently unclear to me how this could have worked previously; \n here is not a literal newline but actual '\' 'n', and was getting passed to the underlying
diff: fix side_by_side after r363679
It's currently unclear to me how this could have worked previously; \n here is not a literal newline but actual '\' 'n', and was getting passed to the underlying regex engine as such. regex(3) does not translate this to a newline, and this became an error because we don't really allow escaping of arbitrary ordinary characters anymore.
Run the pattern strings through printf to make sure we're dealing with real newlines before passing them through to atf_check, which ultimately feeds them directly to regcomp(3).
This fix is different than that will be needed for sed, in that this is the proper way to inject newlines into search strings as long as regex(3) won't combine \ + n as folks might expect.
Reported by: Jenkins via lwhsu MFC after: 1 week
show more ...
|
|
Revision tags: release/11.4.0 |
|
| #
2816b999 |
| 01-Jun-2020 |
Baptiste Daroussin <[email protected]> |
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 <[email protected]> Reported by: Ro
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 <[email protected]> Reported by: Roman Neuhauser <[email protected]> MFC after: 3 days Differential Revision: D25081
show more ...
|
| #
f096ed98 |
| 01-Jun-2020 |
Baptiste Daroussin <[email protected]> |
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.
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 <[email protected]> MFC after: 3 days
show more ...
|
| #
67c90765 |
| 28-Apr-2020 |
Kyle Evans <[email protected]> |
diff(1): don't reject specifying the same format multiple times
This may happen, for instance, if one happens to have an alias of diff to diff -up and attempts to specify the amount of context on to
diff(1): don't reject specifying the same format multiple times
This may happen, for instance, if one happens to have an alias of diff to diff -up and attempts to specify the amount of context on top of that.
Aliases like this may cause other problems, but if they're really not ever generating non-unified diffs then we should at least not break that use-case.
In addition, we'll now pick up a format mismatch if -p is specified with !contextual && !unified && !unset.
Fix up a small trailing whitespace nit in the tests while we're here, and add tests to make sure that we can double up all the formatting options.
Reported by: jbeich MFC after: 3 days
show more ...
|
| #
db9cccfb |
| 20-Apr-2020 |
Kyle Evans <[email protected]> |
diff(1): reject conflicting formatting options
This matches GNU diff(1) behavior and, more importantly, eliminates any source of confusion if multiple formatting options are specified.
Note that th
diff(1): reject conflicting formatting options
This matches GNU diff(1) behavior and, more importantly, eliminates any source of confusion if multiple formatting options are specified.
Note that the committed diff differs slightly from the submitted: I've modified it so that we initialize diff_format to something that isn't an accepted format option so that we can also reject --normal -c and -c --normal, which would've otherwise been accepted because the default was --normal. After option parsing we default it to D_NORMAL if it's still unset.
PR: 243975 Submitted by: fehmi noyan isi MFC after: 1 week
show more ...
|
| #
43fbd654 |
| 13-Feb-2020 |
Kyle Evans <[email protected]> |
diff: fix segfault with --tabsize and no/malformed argument
--tabsize was previously listed as optional_argument, but didn't account for the optionality of it in the argument handling. This is irrel
diff: fix segfault with --tabsize and no/malformed argument
--tabsize was previously listed as optional_argument, but didn't account for the optionality of it in the argument handling. This is irrelevant -- the manpage doesn't indicate that the argument is optional, and indeed there's no clear interpretation of omitting the argument because there's no other side effect of --tabsize.
The "malformed" argument part of the header on this message is simply referring to usage like this:
% diff --tabsize 4 A B
With an optional_argument, the argument must be attached to the parameter directly (e.g. --tabsize=4), so the argument is effectively NULL with the above invocation as if no argument had been passed.
PR: 243974 Submitted by: fehmi noyan isi <fnoyanisi yahoo com> (diff.c portion) MFC after: 3 days
show more ...
|
| #
64793e74 |
| 07-Feb-2020 |
Baptiste Daroussin <[email protected]> |
diff: implement -y (--side-by-side) along with -W and --suppress-common-lines
PR: 219933 Submitted by: fehmi noyan isi <[email protected]> MFC after: 3 weeks
|
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
| #
e68edb8c |
| 19-Aug-2018 |
Kyle Evans <[email protected]> |
diff(1): Implement -B/--ignore-blank-lines
As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag. This was not previously implemented here, so one was forced to create a link for G
diff(1): Implement -B/--ignore-blank-lines
As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag. This was not previously implemented here, so one was forced to create a link for GNU diff to /usr/local/bin/diff
Implement the -B flag and add some primitive tests for it. It is implemented in the same fashion that -I is implemented; each chunk's lines are scanned, and if a non-blank line is encountered then the chunk will be output. Otherwise, it's skipped.
MFC after: 2 weeks
show more ...
|
| #
9977c7b5 |
| 27-Jul-2018 |
Xin LI <[email protected]> |
Improve --strip-trailing-cr handling:
- Advance ctold for f1 and ctnew for f2 - ungetc() if the character is unexpected - Don't break early when we hit the combination on one side
PR: 230049 Re
Improve --strip-trailing-cr handling:
- Advance ctold for f1 and ctnew for f2 - ungetc() if the character is unexpected - Don't break early when we hit the combination on one side
PR: 230049 Reported by: maskray <emacsray gmail com> Reviewed by: bapt, maskray MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16451
show more ...
|
|
Revision tags: release/11.2.0, release/10.4.0, release/11.1.0 |
|
| #
4017abe2 |
| 17-Jul-2017 |
Enji Cooper <[email protected]> |
Add tests that exercise -q, like -rq and add tests that test -q like -Nrq
MFC after: 2 months MFC with: r321076, r321077, r321078
|
| #
4574a545 |
| 17-Jul-2017 |
Enji Cooper <[email protected]> |
Add some tests for brief (--brief/-q) format
MFC after: 2 months MFC with: r321076
|
| #
29d65f1c |
| 12-Jun-2017 |
Enji Cooper <[email protected]> |
Add some testcases for `diff --side-by-side` support
These are were created proactively, in anticipation of the support being fully implemented sometime in the future.
The tests currently fail on ^
Add some testcases for `diff --side-by-side` support
These are were created proactively, in anticipation of the support being fully implemented sometime in the future.
The tests currently fail on ^/head@r319845, however. Expect them to fail.
PR: 219933 Tested with: gdiff
show more ...
|
| #
fddcb7b8 |
| 20-Apr-2017 |
Baptiste Daroussin <[email protected]> |
Implement a basic --changed-group-format
etcupdate(8) requires that option, while GNU diff supports many more variation of that options, their behaviour beside the simple verion implemented here are
Implement a basic --changed-group-format
etcupdate(8) requires that option, while GNU diff supports many more variation of that options, their behaviour beside the simple verion implemented here are quite inconsistent as such I do not plan to implement those.
The only special keyword supported by this implementation are: %< and %> %= is not implemented as the documentation of GNU diff says: common lines, but it actually when tested print the changes from the first file
show more ...
|
| #
05d06eca |
| 20-Apr-2017 |
Baptiste Daroussin <[email protected]> |
Add a regression test for diff -D
|
| #
385a67dc |
| 26-Mar-2017 |
Jilles Tjoelker <[email protected]> |
diff: Show nanoseconds in -u/-c header line.
Show nanoseconds in the -u/-c header line.
The present portability conditionals cannot handle the POSIX standard st_mtim, so remove them and uncondition
diff: Show nanoseconds in -u/-c header line.
Show nanoseconds in the -u/-c header line.
The present portability conditionals cannot handle the POSIX standard st_mtim, so remove them and unconditionally use st_mtim.
PR: 218018 Reported by: jbeich Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10145
show more ...
|
| #
58cf4d86 |
| 26-Mar-2017 |
Jilles Tjoelker <[email protected]> |
diff: Fix mtime of file1 in -u/-c header line.
PR: 218018 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10140
|
| #
458cbf0a |
| 23-Mar-2017 |
Enji Cooper <[email protected]> |
Rename tests from <foo> to <foo>_test to match the FreeBSD test suite naming scheme
usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test to avoid collisions with the renamed FreeBSD t
Rename tests from <foo> to <foo>_test to match the FreeBSD test suite naming scheme
usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test to avoid collisions with the renamed FreeBSD test.
MFC after: 1 week Sponsored by: Dell EMC Isilon
show more ...
|