@@ -1335,11 +1335,16 @@ static int git_imap_config(const char *key, const char *val, void *cb)
1335
1335
if (strncmp (key , imap_key , sizeof imap_key - 1 ))
1336
1336
return 0 ;
1337
1337
1338
- if (!val )
1339
- return config_error_nonbool (key );
1340
-
1341
1338
key += sizeof imap_key - 1 ;
1342
1339
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
+
1343
1348
if (!strcmp ("folder" , key )) {
1344
1349
imap_folder = xstrdup (val );
1345
1350
} else if (!strcmp ("host" , key )) {
@@ -1360,10 +1365,6 @@ static int git_imap_config(const char *key, const char *val, void *cb)
1360
1365
server .port = git_config_int (key , val );
1361
1366
else if (!strcmp ("tunnel" , key ))
1362
1367
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 );
1367
1368
return 0 ;
1368
1369
}
1369
1370
0 commit comments