Skip to content

Handle patch trailers with special characters

Brandon Maier tools 2 versions Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20241027-trailer-special-chars-78b97ff63ea9

Versions newest first

  1. v2 Latest6 patches 1 replyApplied
  2. v16 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fixed other tests that broke when the email parsing changed
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6src/tests: check trailer extinfosrc/tests/test___init__.py+1 -00 replies
2/6src/tests: fix trailer test hiding parser errorssrc/tests/test___init__.py+6 -20 replies
3/6b4: handle trailers with improper formattingsrc/b4/__init__.py+3 -10 replies
4/6src/tests: test for trailers with improper formattingsrc/tests/samples/trailers-test-extinfo.txt src/tests/test___init__.py+3 -10 replies
5/6b4: handle trailers with special characterssrc/b4/__init__.py src/tests/samples/trailers-followup-bare-address-ref-defaults.txt src/tests/samples/trailers-followup-name-parens-ref-defaults.txt+4 -60 replies
6/6src/tests: test for trailers with special characterssrc/tests/samples/trailers-test-simple.txt src/tests/test___init__.py+3 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH b4 v2 0/6] Handle patch trailers with special characters

Fixes bug reported in https://github.com/mricon/b4/issues/50

Patch trailers that contain commas are not parsed correctly, this causes the trailer to be set to a blank string. The issue is special characters in emails are supposed to be quoted per RFC 2822. But it's fairly common for patch trailers to be hand-written and be improperly formatted.

The trailer tests were hiding some of the parsing issues, so the first few patches fix up the test.

While fixing this bug I discovered the trailer parser also breaks even when the trailer is properly quoted, so I fix that in this series as well.

---
Changes in v2:
- Fixed other tests that broke when the email parsing changed
- Link to v1: https://patch.msgid.link/[email protected]

---
Brandon Maier (6):
src/tests: check trailer extinfo
src/tests: fix trailer test hiding parser errors
b4: handle trailers with improper formatting src/tests: test for trailers with improper formatting
b4: handle trailers with special characters src/tests: test for trailers with special characters

 src/b4/__init__.py                                          |  6 +++---
 .../samples/trailers-followup-bare-address-ref-defaults.txt |  2 +-
 .../samples/trailers-followup-name-parens-ref-defaults.txt  |  2 +-
 src/tests/samples/trailers-test-extinfo.txt                 |  1 +
 src/tests/samples/trailers-test-simple.txt                  |  1 +
 src/tests/test___init__.py                                  | 13 ++++++++++---
 6 files changed, 17 insertions(+), 8 deletions(-)

---
base-commit: 2a6338e451a0c1e81f214f48c820c1e52d76b2f1
change-id: 20241027-trailer-special-chars-78b97ff63ea9

Best regards,

Signature · 1 line
Brandon Maier <[email protected]>