Skip to content

Fix .mailmap identity comparisons and the missing-cover KeyError

Hangbin Liu tools 1 version New

Get series with b4
b4 am [email protected] change-id 20261016-b4_mailmap-e33d8ae9ca53

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ez: use raw committer emails for identity checks and diagnosticssrc/b4/ez.py src/tests/test_ez.py+48 -20 replies
2/2ez: exit cleanly when prep tracking data is missingsrc/b4/ez.py src/tests/test_ez.py+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH b4 0/2] Fix .mailmap identity comparisons and the missing-cover KeyError

This series closes two remaining identity/tracking problems in the ez prep workflow.

When a tree's .mailmap gains an alias for your own address, git log matches --committer against the mailmap-canonicalized identity (log.mailmap defaults to true), and 509f56ff5c24 already taught find_cover_commit() to pass --no-mailmap so the cover letter stays findable. Two comparisons still read the wrong identity, though: %cE comes back mailmap-canonicalized even with --no-mailmap, so b4 prep --claim treated a series you committed yourself as someone else's work and re-stamped every commit (patch 1).

Separately, get_prep_branch_as_patches() indexed tracking['series'] without checking that any tracking was loaded at all, so any caller arriving without a cover letter -- b4 prep --auto-to-cc on a branch that was never prepped, or a cover older than the search's --since=1.year window -- died with a bare KeyError traceback instead of the diagnostic every other prep subcommand prints (patch 2).

Run ci.sh, all test passed except one pre-existing failure test_base_commit_in_remote_tree.

---
Hangbin Liu (2):
ez: use raw committer emails for identity checks and diagnostics
ez: exit cleanly when prep tracking data is missing

 src/b4/ez.py         | 11 ++++++++--
 src/tests/test_ez.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)

---
base-commit: 6be7c6139d7734d84afddf989fa2874935b6d85b
change-id: 20261016-b4_mailmap-e33d8ae9ca53

Best regards,

Signature · 1 line
Hangbin Liu <[email protected]>