git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/7] Cure some format-patch wrapping and encoding issues

From
JSJan H. Schönherr <schnhrr@cs.tu-berlin.de>
Date
Oct 18, 2012, 14:43 UTC
Message-ID
<1350571414-17907-1-git-send-email-schnhrr@cs.tu-berlin.de>
Hi all.

[This is the second version of this series. If you still remember the first version, you might want to jump directly to the summary of changes below.]

The main point of this series is to teach git to encode my name correctly, see patches 5+6, so that the decoded version is actually my name, so that send-email does not insist on adding a wrong superfluous From: line to the mail body.

The other patches more mostly by-products that fix other issues I came across.

Patch 1 fixes an old off-by-one error, so that wrapped text may now use all available columns.

Patches 2 and 3 make the wrapping of header lines more correct, i. e., neither too early nor too late.

Patch 4 does some refactoring, which is too unrelated to be included in one of the later patches.

Patch 5 improves RFC 2047 encoding; patch 6 removes an old non-RFC conform workaround.

Patch 7 is more an RFC, which seems to be a good idea from my point of view. Indeed, I thought the current implementation is erroneous, until Junio C Hamano pointed out, that this might be desired behavior. Thus, make up your mind about this one.

The series is currently based on the maint branch, but it applies to master as well. It does also apply to next, but then my implementation of isprint() has to be dropped from patch 5.

Changes in v2:
- patch 1 is new and is a result of the v1 discussion
- patch 5+6 split the old patch 4 into two patches
- use of constants for maximum line lengths
- even better adherence to RFC 2047 than v1
- updated commit messages/comments

Regards Jan

Jan H. Schönherr (7):
  utf8: fix off-by-one wrapping of text
  format-patch: do not wrap non-rfc2047 headers too early
  format-patch: do not wrap rfc2047 encoded headers too late
  format-patch: introduce helper function last_line_length()
  format-patch: make rfc2047 encoding more strict
  format-patch: fix rfc2047 address encoding with respect to rfc822
    specials
  format-patch tests: check quoting/encoding in To: and Cc: headers
 git-compat-util.h       |   2 +
 pretty.c                | 149 +++++++++++++++++++++++--------
 t/t4014-format-patch.sh | 231 ++++++++++++++++++++++++++++++------------------
 t/t4202-log.sh          |   4 +-
 utf8.c                  |   2 +-
 5 Dateien geändert, 262 Zeilen hinzugefügt(+), 126 Zeilen entfernt(-)
-- 
1.7.12
Next: Jan H. Schönherr
Message 1 of 8 in “Cure some format-patch wrapping and encoding issues”
  1. 0/7 Cure some format-patch wrapping and encoding issuesJan H. Schönherr, Oct 18, 2012
  2. 1/7 utf8: fix off-by-one wrapping of textJan H. Schönherr, Oct 18, 2012
  3. 2/7 format-patch: do not wrap non-rfc2047 headers too earlyJan H. Schönherr, Oct 18, 2012
  4. 3/7 format-patch: do not wrap rfc2047 encoded headers too lateJan H. Schönherr, Oct 18, 2012
  5. 4/7 format-patch: introduce helper function last_line_length()Jan H. Schönherr, Oct 18, 2012
  6. 5/7 format-patch: make rfc2047 encoding more strictJan H. Schönherr, Oct 18, 2012
  7. 6/7 format-patch: fix rfc2047 address encoding with respect to rfc822 specialsJan H. Schönherr, Oct 18, 2012
  8. 7/7 format-patch tests: check quoting/encoding in To: and Cc: headersJan H. Schönherr, Oct 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.