diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-07-28 23:39:30 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-08-03 19:48:05 -0700 |
| commit | d58aa27d067aec2044d3ddd69e35bdefc859b0d9 (patch) | |
| tree | 314fa9fb753fe154853b81533b637fb52c438232 /scripts/git-hooks/commit-msg | |
| parent | tail: allow >=2**64 in traditional form (diff) | |
| download | coreutils-d58aa27d067aec2044d3ddd69e35bdefc859b0d9.tar.gz coreutils-d58aa27d067aec2044d3ddd69e35bdefc859b0d9.zip | |
tail: speed up -c N for huge N
When the user specifies -c N where 2**63 <= N, don’t give
up and use the slow method (which will exhaust memory if
the file is large). Instead, treat it as N = 2**63 - 1,
since that has equivalent effect.
* src/tail.c (tail_bytes): With -c N and large N, adjust
the code so that lseeks can still be used without
affecting correctness. Formerly the code gave up and
did a sequential pass through the whole input, which
could easily exhaust memory.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
