Skip to content

find: print a fixed-width fraction for -printf %T+ - #792

Merged
sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:find-printf-t-plus-fraction
Jul 26, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:find-printf-t-plus-fraction

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

chrono's %.f drops the fraction (and the leading dot) entirely when the sub-second part is zero, while GNU find always prints a dot followed by ten fractional digits. Use an explicit .%f0 so whole-second timestamps format the same way as GNU.

Causes a bug with lintian

chrono's %.f drops the fraction (and the leading dot) entirely when the
sub-second part is zero, while GNU find always prints a dot followed by
ten fractional digits. Use an explicit .%f0 so whole-second timestamps
format the same way as GNU.
@sylvestre
sylvestre force-pushed the find-printf-t-plus-fraction branch from 33f28d6 to 5827d39 Compare July 26, 2026 14:37
@codspeed

codspeed Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing sylvestre:find-printf-t-plus-fraction (5827d39) with main (f41011c)

Open in CodSpeed

@github-actions

Copy link
Copy Markdown

Commit 33f28d6 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 313 / PASSED: 267 / FAILED: 40 / SKIPPED: 6
  Reference: TOTAL: 314 / PASSED: 266 / FAILED: 42 / SKIPPED: 6

Changes from main branch:
  TOTAL: -1
  PASSED: +1
  FAILED: -2

Test improvements (2):
  + gnu/files0_from_ok
  + gnu/okdir_path_empty

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.91%. Comparing base (f41011c) to head (5827d39).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   91.88%   91.91%   +0.02%     
==========================================
  Files          35       35              
  Lines        7159     7185      +26     
  Branches      376      376              
==========================================
+ Hits         6578     6604      +26     
  Misses        437      437              
  Partials      144      144              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Commit 5827d39 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 314 / PASSED: 267 / FAILED: 41 / SKIPPED: 6
  Reference: TOTAL: 314 / PASSED: 266 / FAILED: 42 / SKIPPED: 6

Changes from main branch:
  TOTAL: +0
  PASSED: +1
  FAILED: -1

New test failures (1):
  - gnu/okdir_path_relative

Test improvements (2):
  + gnu/files0_from_ok
  + gnu/okdir_path_empty

@sylvestre
sylvestre merged commit f38dbe5 into uutils:main Jul 26, 2026
21 of 22 checks passed
@sylvestre
sylvestre deleted the find-printf-t-plus-fraction branch July 26, 2026 15:01
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.

1 participant