Skip to content

pr: ignore empty line after newline char - #10332

Merged
ChrisDryden merged 2 commits into
uutils:mainfrom
jfinkels:pr-newline-form-feed
Jan 19, 2026
Merged

pr: ignore empty line after newline char#10332
ChrisDryden merged 2 commits into
uutils:mainfrom
jfinkels:pr-newline-form-feed

Conversation

@jfinkels

Copy link
Copy Markdown
Collaborator

Depends on #10303.

Fix a bug in pr where a form feed character (\f) immediately
following a newline character (\n) was incorrectly rendered as an
extra blank line in the output when running with the -f option. After
this commit, the empty line is correctly ignored.

@codspeed-hq

codspeed-hq Bot commented Jan 18, 2026

Copy link
Copy Markdown

CodSpeed Performance Report

Merging this PR will degrade performance by 15.33%

Comparing jfinkels:pr-newline-form-feed (92b79f5) with main (cefe8a1)1

Summary

⚡ 1 improved benchmark
❌ 7 regressed benchmarks
✅ 274 untouched benchmarks
⏩ 38 skipped benchmarks2

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory sort_long_line[160000] 858.6 KB 716.6 KB +19.81%
Memory sort_unique_locale[500000] 33 MB 36.9 MB -10.58%
Memory sort_accented_data[500000] 21.6 MB 25.5 MB -15.33%
Memory sort_key_field[500000] 29.2 MB 32.8 MB -11.14%
Memory sort_numeric[500000] 46 MB 48.7 MB -5.5%
Memory sort_ascii_only[500000] 21.9 MB 25.5 MB -14.35%
Memory sort_mixed_data[500000] 22.4 MB 25.8 MB -13.2%
Memory du_wide_tree[(5000, 500)] 1.2 MB 1.2 MB -3.92%

Footnotes

  1. No successful run was found on main (5973613) during the generation of this report, so cefe8a1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Fix a bug in `pr` where a form feed character (`\f`) immediately
following a newline character (`\n`) was incorrectly rendered as an
extra blank line in the output when running with the `-f` option. After
this commit, the empty line is correctly ignored.
@jfinkels
jfinkels force-pushed the pr-newline-form-feed branch from c320271 to 0e36e4b Compare January 18, 2026 19:41
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/follow-name (fails in this run but passes in the 'main' branch)

@jfinkels
jfinkels marked this pull request as ready for review January 19, 2026 01:35
@ChrisDryden

ChrisDryden commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator

This overall made the GNU test failures go down by 10 but also introduced 6 regressions, Its due to issues in the line_num count. I'm trying to figure out locally what the missing conditions are.

EDIT: My bad was not comparing the right upstream main, there were 6 test fixes and no regressions

@ChrisDryden

Copy link
Copy Markdown
Collaborator

I've been messing around for a while to see what are the causes of the regressions before the most recent set of PR changes:

     9Pr
     9Pr.p
     9Pr.r
     9Pt
     9Pt.p
     9Pt.r

These ones began failing after: "597361324 (pr: ignore empty line after form feed char #10331)" but I m unable to replicate what the fix would be for these since there are multiple issues that appear to cancel out that make these tests pass. So in that other PR, even though the logic was correct it still caused these regressions

@ChrisDryden
ChrisDryden merged commit 425b232 into uutils:main Jan 19, 2026
155 of 157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants