You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find -printf: %a/%c/%t time directives are missing, unknown directives drop the '%' (GNU keeps it), the 0 flag zero-pads strings, '+' is dropped, and %T@ carries sub-microsecond jitter #1379
Probe-verified (same-source mingw+Wine harness, two runs, GNU findutils 4.9.0). The -printf implementation in src/commands/find.cpp diverges from GNU find in five measured ways (fixture file pinned to mtime @1600000000 where relevant):
Time directives %a, %c, %t are missing.find . -name f -printf '%a\n' → WinuxCmd prints the literal letter a plus find: warning: unrecognized format directive '%a' on stderr. GNU prints Sun Sep 13 12:26:40.0000000000 2020.
Unknown directives lose the %.-printf '%Q\n' → WinuxCmd prints Q; GNU prints %Q (both emit the same unrecognized-directive warning). Note: the in-repo regression pin for this behavior asserts the WinuxCmd output — the pin itself encodes the anti-GNU expectation and needs flipping with the fix.
The 0 flag zero-pads strings.-printf '%05p|' → WinuxCmd 00./f|; GNU ./f| (0 is ignored for non-numeric conversions; width pads with spaces).
The + flag is dropped.-printf '%+5d|' on a depth-1 file → WinuxCmd 1|; GNU +1|. (The space flag happens to agree.) The in-repo pin likewise encodes the current behavior.
%T@ is imprecise and nondeterministic. Two consecutive runs printed 1599999999.999999400 and 1599999999.999999500 for a file pinned to exactly 1600000000; GNU prints 1600000000.0000000000. (Related format nit: %A@ prints 9 fractional digits, GNU prints 10.)
Expected (GNU find)
The full directive repertoire with ctime-style %a/%c/%t, verbatim % for unknown directives, C-printf flag semantics per conversion kind, and exact epoch rendering.
Regression seed
In-repo tests named with this issue number: the five probes above; the existing anti-GNU pins for faces 2 and 4 are updated to the GNU expectations.
Fixed by #1400: %a/%c/%t time directives, verbatim '%' for unknown -printf directives (GNU keeps the percent — the pre-existing anti-GNU pin was flipped during verification), C-printf flag semantics per conversion kind (0 ignored for %p, '+' honored for %d), and exact deterministic %T@ epoch rendering. Regression pins issue_1379_* landed with the PR; two pins were corrected to the probe-verified GNU oracle during verification.
Activity
fix(find): finish main merge in scan_one_root; align GNU printf pins (#…
Merge pull request #1400 from unixwin/fix/winx5-find
caomengxuan666 commentedon Oct 27, 2026
Fixed by #1400: %a/%c/%t time directives, verbatim '%' for unknown -printf directives (GNU keeps the percent — the pre-existing anti-GNU pin was flipped during verification), C-printf flag semantics per conversion kind (0 ignored for %p, '+' honored for %d), and exact deterministic %T@ epoch rendering. Regression pins
issue_1379_*landed with the PR; two pins were corrected to the probe-verified GNU oracle during verification.