diff options
author | Junio C Hamano <junkio@cox.net> | 2007-06-02 12:05:08 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-06-02 12:05:08 -0700 |
commit | 86eff8c512b96ce3ee0ae5818edfa035b98cdf08 (patch) | |
tree | 0d562bf2e10356ca6b085787dd726c430e680436 /commit.c | |
parent | Fix git-am(1) synopsis formatting (diff) | |
parent | Use =20 when rfc2047 encoding spaces. (diff) | |
download | tgif-86eff8c512b96ce3ee0ae5818edfa035b98cdf08.tar.xz |
Merge branch 'maint'
* maint:
Use =20 when rfc2047 encoding spaces.
Create a new manpage for the gitignore format, and reference it elsewhere
Documentation: robustify asciidoc GIT_VERSION replacement
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -511,12 +511,16 @@ static int add_rfc2047(char *buf, const char *line, int len, bp += i; for (i = 0; i < len; i++) { unsigned ch = line[i] & 0xFF; - if (is_rfc2047_special(ch)) { + /* + * We encode ' ' using '=20' even though rfc2047 + * allows using '_' for readability. Unfortunately, + * many programs do not understand this and just + * leave the underscore in place. + */ + if (is_rfc2047_special(ch) || ch == ' ') { sprintf(bp, "=%02X", ch); bp += 3; } - else if (ch == ' ') - *bp++ = '_'; else *bp++ = ch; } |