summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-29 22:30:47 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-29 22:30:48 -0700
commit52938b113b4dd09bae869326d4993a7b998e6877 (patch)
tree717e0d86b8a0d24f95b8fd3f3672d321917c4856 /builtin
parentRevert "completion: fix shell expansion of items" (diff)
parentmailinfo: do not concatenate charset= attribute values from mime headers (diff)
downloadtgif-52938b113b4dd09bae869326d4993a7b998e6877.tar.xz
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 18895ee4d9..9973bd9099 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++;