diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-08-07 15:42:23 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-08-07 20:20:04 -0700 |
| commit | 26bf557e3f79352d36df0a6de5908e656a4f1dc4 (patch) | |
| tree | 6a0cca971b7f8730f793b1de5335e1f966363548 /scripts/git-hooks/commit-msg | |
| parent | cp: --sparse=always was missing some holes (diff) | |
| download | coreutils-26bf557e3f79352d36df0a6de5908e656a4f1dc4.tar.gz coreutils-26bf557e3f79352d36df0a6de5908e656a4f1dc4.zip | |
cp: omit some needless lseek calls
The sparse code sometimes issued multiple lseeks against the
same file without doing anything in betwee. Optimize them away
by keeping track of the last hole output, in a way that
crosses the sparse_copy function call boundary.
* src/copy.c (sparse_copy): New arg hole_size, replacing old args
scan_holes and last_write_made_hole. All callers changed.
(sparse_copy, lseek_copy): Do not create hole at
end; let the caller deal with it. All callers changed.
(lseek_copy): New args hole_size and total_n_read. Caller changed.
(copy_reg): Create hole at end for both lseek_copy and sparse_copy.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
