Repository navigation
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
|
@fixfon please drop the merge commit and then squash into one commit |
--verbose announced the output files for -b, -l and -C but not for any --number mode, because the files are opened through OutFiles, which never called print_creating_file. Announce each file once, right before it is first opened, whether OutFiles opens it up front or lazily (-e). Kth-chunk modes write to stdout and still print nothing. Fixes uutils#15583
fixfon
force-pushed
the
fix/15583-split-verbose-n
branch
from
October 26, 2026 18:24
bb20494 to
8b7cc48
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.
In the
-nmodes,split --verbosenever printed "creating file". Those modes open their output files throughOutFiles(init, andinstantiate_writerfor the lazy-epath), and neither of them calledprint_creating_file, which is what-b,-land-Calready use.Both paths now call it right before the file is opened. I also added an
announcedflag onOutFile, so a file that gets reopened because of the fd limit isn't announced a second time. TheK/Nforms write to stdout and create no file, so they still print nothing.Added
test_verbose_number_of_chunks, which covers 14 combinations and fails on main, plus a small test checking that-n K/Nstays quiet. I also compared the output against GNU 9.12spliton macOS for-n N,l/N,r/N, with and without-e, and for empty input. Output and order match in all of them.Not touched, since main already behaves this way: with
--filter, GNU prints "executing with FILE=..." while we print "creating file". When it runs into a lowulimit -n, GNU also announces a file again each time it reopens it.Fixes #15583