summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-08 21:54:10 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-08 21:54:10 -0800
commit105a6339d8454d3856099f6ccea14435a05e2268 (patch)
treeae998ef88c0b1cd495c1fd354902e6d9a74e8974 /imap-send.c
parent720c9f7bda20d8f307745772374647c1a2076b3d (diff)
parente33cc592deae8132936eea119554799e1039bc0f (diff)
downloadgit-105a6339d8454d3856099f6ccea14435a05e2268.tar.gz
Merge branch 'maint'
* maint: blame: prevent a segv when -L given start > EOF git-push: document all the status flags used in the output Fix parsing of imap.preformattedHTML and imap.sslverify git-add documentation: Fix shell quoting example
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 51f371ba9f..ba72fa4b6e 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1331,11 +1331,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)) {
@@ -1356,10 +1361,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;
}