summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-30 05:30:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-30 05:30:48 (GMT)
commit52938b113b4dd09bae869326d4993a7b998e6877 (patch)
tree717e0d86b8a0d24f95b8fd3f3672d321917c4856 /builtin
parent666ca59a8c88e1750386fa64c7ed4be698fd1b2a (diff)
parent176943b9658b1fa9ae3972156100d831d19c3576 (diff)
downloadgit-52938b113b4dd09bae869326d4993a7b998e6877.zip
git-52938b113b4dd09bae869326d4993a7b998e6877.tar.gz
git-52938b113b4dd09bae869326d4993a7b998e6877.tar.bz2
Merge branch 'jc/maint-mailinfo-mime-attr' into maint
* 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 18895ee..9973bd9 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++;