]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r338039: diff(1): Implement -B/--ignore-blank-lines
authorkevans <kevans@FreeBSD.org>
Wed, 3 Oct 2018 17:16:18 +0000 (17:16 +0000)
committerkevans <kevans@FreeBSD.org>
Wed, 3 Oct 2018 17:16:18 +0000 (17:16 +0000)
commit128e98b2c8f402f8bad0dd76cf88dc3efe545b8d
tree7d7c2770cecc2d09b43966015563475b946bd7cb
parent6cd2065f7dec5cbe20866dd48ec1759042b3c232
MFC r338039: 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.
usr.bin/diff/TODO
usr.bin/diff/diff.1
usr.bin/diff/diff.c
usr.bin/diff/diff.h
usr.bin/diff/diffreg.c
usr.bin/diff/tests/Bflag_C.out [new file with mode: 0644]
usr.bin/diff/tests/Bflag_D.out [new file with mode: 0644]
usr.bin/diff/tests/Bflag_F.out [new file with mode: 0644]
usr.bin/diff/tests/Makefile
usr.bin/diff/tests/diff_test.sh