diff options
author | Jan H. Schönherr <schnhrr@cs.tu-berlin.de> | 2012-10-18 16:43:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-18 14:23:12 -0700 |
commit | 7a76e68a177720da65e7d9cfa49d702a55e2d9de (patch) | |
tree | e8d03be40b9710b0887c4836fea465c56b30d7f8 /pretty.c | |
parent | 14e1a4e1ff70aff36db3f5d2a8b806efd0134d50 (diff) | |
download | git-7a76e68a177720da65e7d9cfa49d702a55e2d9de.tar.gz |
format-patch: do not wrap non-rfc2047 headers too early
Do not wrap the second and later lines of non-rfc2047-encoded headers
substantially before the 78 character limit.
Instead of passing the remaining length of the first line as wrapping
width, use the correct maximum length and tell strbuf_add_wrapped_bytes()
how many characters of the first line are already used.
Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -286,7 +286,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len, if ((i + 1 < len) && (ch == '=' && line[i+1] == '?')) goto needquote; } - strbuf_add_wrapped_bytes(sb, line, len, 0, 1, max_length - line_len); + strbuf_add_wrapped_bytes(sb, line, len, -line_len, 1, max_length); return; needquote: |