refactor(test): share compiled time regex

Summary

  • Add one shared cmdtest.TimeRE for variable year counts in relative timestamps.
  • Replace all seven duplicated regex compilations across four command test suites.
  • Keep the change test-only with no production behavior changes.

Testing

  • affected packages: go test -count=10
  • affected packages: go test -race -count=1
  • affected packages: go vet
  • structural verification: one shared compilation, seven consumers, zero old local compilations
  • current-main replay, DCO, scope, and diff checks

AI assistance

Implemented and tested with assistance from OpenAI Codex; the exact current-main candidate was independently reviewed and verified locally.

Closes #1093 (closed)

Merge request reports

Loading
Loading