Repository navigation
Conversation
Contributor
|
@Logic769 as I asked you many time to stop pushing a lot of patches and you ignored me, i have no other solutions than to block you temporarily. |
Logic769
force-pushed
the
head-stdin-offset-backwards
branch
from
October 30, 2026 13:01
3b90f78 to
2be886f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When stdin is a seekable regular file that has already been partly read and is
larger than
st_blksize,head -n -Nandhead -c -Ntreated stdin asstarting at byte 0.
head -n -Nre-printed the consumed leading bytes andhead -c -Nprinted part of the tail it should have dropped, and stdin was leftat the wrong offset.
head_backwards_on_seekable_filenow computes its counts from the current fileoffset instead of absolute offsets, and
find_nth_line_from_endsearches onlythe data after the current position. A partly consumed seekable stdin is
therefore handled like GNU head, while file operands and pipes are unchanged.
Tests cover both
-n -Nand-c -Non a large file whose first line hasalready been consumed.
Closes #15756