aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-25 10:39:56 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-25 10:39:56 -0700
commitb1bb02dede05e26ae39908ae4ad35f011583bd50 (patch)
treea804bdd9651232b18c056e7217557bd21cd9f6b0 /builtin
parentff91dbbf7d8ed9d1f67fe69e62fd883194916b07 (diff)
parent176943b9658b1fa9ae3972156100d831d19c3576 (diff)
downloadgit-b1bb02dede05e26ae39908ae4ad35f011583bd50.tar.gz
git-b1bb02dede05e26ae39908ae4ad35f011583bd50.tar.xz
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index b691b7715..2b3f4d955 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++;