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
feat(fields): add author-date and committer-date to FIELD_ATTR
* feat(fields): add author-date and committer-date to FIELD_ATTR
- Extend FIELD_ATTR in ops.py with 'author-date' and 'committer-date'
mapped to commit.author_date / commit.committer_date; strip/replace
now accept --field author-date and --field committer-date automatically
(choices derive from the dict keys).
- Fix _get_field_value in cli.py: add %ad/%cd to the fmt_map and pass
--date=raw for date fields so preview/match-counting reflects the raw
b'<epoch> <tz>' format that git-filter-repo uses.
- Add examples/normalize_timezone.py: rewrites all timezone offsets to
UTC (+0000) while preserving the epoch second.
- Update README --field table to list the two new fields and note they
require git-filter-repo; add replace --field date examples.
- Add tests in test_ops.py (strip/replace on author-date, committer-date)
and test_cli.py (parser accepts --field author-date/committer-date).
Closes#2
* fix(lint): resolve all 14 ruff errors (I001, E702, F401, F541, F841, E741)
* refactor(fields): drop lint churn; add strip-date warning to README
- Revert scope-creep from the fix(lint) commit:
- cli.py: restore f-string on 'action' print, restore body variable,
restore l loop variable in list comprehension
- tests/test_cli.py: restore original import order (build_parser first)
and blank line after import block
- tests/test_ops.py: restore textwrap-before-tempfile import order
and blank line after from-import
- README: add blockquote note under strip section explaining that using
--field author-date / --field committer-date with strip zeroes the
field to an empty byte string (invalid date); replace is the right
operation for date fields
---------
Co-authored-by: gfargo-horizon-agent[bot] <294710345+gfargo-horizon-agent[bot]@users.noreply.github.com>
0 commit comments