This matches the heuristic used by "notmuch config set" to decide if
something is a list.
This change fixes the bug reported at [1].
[1]: id:6O3LTUhoXlrnkPWCtPJCP4cagU7mFVEdyTpcC_37BoSzStlARXDBa7oczy6hB0jyjGjBQvgj_jFV58cw0aNx-jUg1h1O-FQ7820k68C0X4M=@protonmail.com
const char *list[],
size_t length)
{
- g_key_file_set_string_list (config->key_file, group, key, list, length);
+ if (length > 1)
+ g_key_file_set_string_list (config->key_file, group, key, list, length);
+ else
+ g_key_file_set_string (config->key_file, group, key, list[0]);
}
void
test_expect_equal_file ${expected_dir}/config-with-comments new-notmuch-config
test_begin_subtest "setup consistent with config-set for single items"
-test_subtest_known_broken
# note this relies on the config state from the previous test.
notmuch --config=new-notmuch-config config list > list.setup
notmuch --config=new-notmuch-config config set search.exclude_tags baz
[user]
name=Test Suite
primary_email=test.suite@example.com
-other_email=another.suite@example.com;
+other_email=another.suite@example.com
# Configuration for "notmuch new"
#
# query will override that exclusion.
#
[search]
-exclude_tags=baz;
+exclude_tags=baz
# Maildir compatibility configuration
#