summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-08 23:09:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-08 23:09:19 (GMT)
commit0c15da68e819183fcf85f45daa25965b6fde86cc (patch)
treee473914069b8b0995066fa3ca755264f6157f54a /imap-send.c
parent35da43e9bb4a5d7542c2ee27e0a3557ac921e3ab (diff)
parentace706e2a6213d4252b6862786dd93c71bcbd69f (diff)
downloadgit-0c15da68e819183fcf85f45daa25965b6fde86cc.zip
git-0c15da68e819183fcf85f45daa25965b6fde86cc.tar.gz
git-0c15da68e819183fcf85f45daa25965b6fde86cc.tar.bz2
Merge branch 'jc/maint-imap-config-parse' into maint
* jc/maint-imap-config-parse: Fix parsing of imap.preformattedHTML and imap.sslverify
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/imap-send.c b/imap-send.c
index de8114b..ea769a9 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1335,11 +1335,16 @@ static int git_imap_config(const char *key, const char *val, void *cb)
if (strncmp(key, imap_key, sizeof imap_key - 1))
return 0;
- if (!val)
- return config_error_nonbool(key);
-
key += sizeof imap_key - 1;
+ /* check booleans first, and barf on others */
+ if (!strcmp("sslverify", key))
+ server.ssl_verify = git_config_bool(key, val);
+ else if (!strcmp("preformattedhtml", key))
+ server.use_html = git_config_bool(key, val);
+ else if (!val)
+ return config_error_nonbool(key);
+
if (!strcmp("folder", key)) {
imap_folder = xstrdup(val);
} else if (!strcmp("host", key)) {
@@ -1360,10 +1365,6 @@ static int git_imap_config(const char *key, const char *val, void *cb)
server.port = git_config_int(key, val);
else if (!strcmp("tunnel", key))
server.tunnel = xstrdup(val);
- else if (!strcmp("sslverify", key))
- server.ssl_verify = git_config_bool(key, val);
- else if (!strcmp("preformattedHTML", key))
- server.use_html = git_config_bool(key, val);
return 0;
}