diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-25 21:39:56 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-25 21:39:56 +0400 |
commit | b1bb02dede05e26ae39908ae4ad35f011583bd50 (patch) | |
tree | a804bdd9651232b18c056e7217557bd21cd9f6b0 /builtin | |
parent | ff91dbbf7d8ed9d1f67fe69e62fd883194916b07 (diff) | |
parent | 176943b9658b1fa9ae3972156100d831d19c3576 (diff) |
Merge branch 'jc/maint-mailinfo-mime-attr'
When "git am" is fed an input that has multiple "Content-type: ..."
header, it did not grok charset= attribute correctly.
* jc/maint-mailinfo-mime-attr:
mailinfo: do not concatenate charset= attribute values from mime headers
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mailinfo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index b691b77158..2b3f4d955e 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -160,10 +160,9 @@ static int slurp_attr(const char *line, const char *name, struct strbuf *attr) const char *ends, *ap = strcasestr(line, name); size_t sz; - if (!ap) { - strbuf_setlen(attr, 0); + strbuf_setlen(attr, 0); + if (!ap) return 0; - } ap += strlen(name); if (*ap == '"') { ap++; |