@@ -1335,11 +1335,16 @@ static int git_imap_config(const char *key, const char *val, void *cb)
13351335 if (strncmp (key , imap_key , sizeof imap_key - 1 ))
13361336 return 0 ;
13371337
1338- if (!val )
1339- return config_error_nonbool (key );
1340-
13411338 key += sizeof imap_key - 1 ;
13421339
1340+ /* check booleans first, and barf on others */
1341+ if (!strcmp ("sslverify" , key ))
1342+ server .ssl_verify = git_config_bool (key , val );
1343+ else if (!strcmp ("preformattedhtml" , key ))
1344+ server .use_html = git_config_bool (key , val );
1345+ else if (!val )
1346+ return config_error_nonbool (key );
1347+
13431348 if (!strcmp ("folder" , key )) {
13441349 imap_folder = xstrdup (val );
13451350 } else if (!strcmp ("host" , key )) {
@@ -1360,10 +1365,6 @@ static int git_imap_config(const char *key, const char *val, void *cb)
13601365 server .port = git_config_int (key , val );
13611366 else if (!strcmp ("tunnel" , key ))
13621367 server .tunnel = xstrdup (val );
1363- else if (!strcmp ("sslverify" , key ))
1364- server .ssl_verify = git_config_bool (key , val );
1365- else if (!strcmp ("preformattedHTML" , key ))
1366- server .use_html = git_config_bool (key , val );
13671368 return 0 ;
13681369}
13691370
0 commit comments