]> git.ipfire.org Git - thirdparty/coreutils.git/commit
head: fix --lines=-0 outputting nothing if no newline at EOF
authorАлексей Шилин <rootlexx@mail.ru>
Wed, 29 Jan 2014 01:23:46 +0000 (01:23 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 9 Feb 2014 20:22:33 +0000 (20:22 +0000)
commit476ce37019df5b1cb917c5b50e71f9bce5911401
tree7e207caa284a827d176567e521222ddda21098d6
parent17d92a9106c6d07cc985e6e14f5501dec3db57f2
head: fix --lines=-0 outputting nothing if no newline at EOF

* src/head.c (elide_tail_lines_pipe): Just output all input in
this case to avoid the issue and also avoid redundant '\n' processing.
(elide_tail_lines_seekable): Likewise.
* tests/misc/head-elide-tail.pl: Add tests for no '\n' at EOF.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/16329
NEWS
src/head.c
tests/misc/head-elide-tail.pl