diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-07-29 08:24:58 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-08-03 19:48:05 -0700 |
| commit | 09fc945b374d256869615591171d744462e20c6e (patch) | |
| tree | 20724bc62aaad4d1bc198d276ede017f13a17de3 /scripts/git-hooks/commit-msg | |
| parent | tail: speed up -c N for huge N (diff) | |
| download | coreutils-09fc945b374d256869615591171d744462e20c6e.tar.gz coreutils-09fc945b374d256869615591171d744462e20c6e.zip | |
tail: refactor to skip stat call on failure
* src/tail.c (tail_bytes): New function.
(tail_bytes, tail_lines, tail): Accept struct stat pointer from
caller instead of calling fstat ourselves. All callers changed.
(tail_file): Skip a call to fstat if fstat already failed.
* tests/tail/follow-stdin.sh: Adjust to match new behavior
on failure, which omits a redundant diagnostic.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
