mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
lib/config: add NOTMUCH_CONFIG_AUTOCOMMIT
This will be used to control how often atomic transactions are committed.
This commit is contained in:
parent
65f923219e
commit
2f608d2a94
5 changed files with 11 additions and 0 deletions
|
@ -593,6 +593,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key)
|
||||||
return "user.other_email";
|
return "user.other_email";
|
||||||
case NOTMUCH_CONFIG_USER_NAME:
|
case NOTMUCH_CONFIG_USER_NAME:
|
||||||
return "user.name";
|
return "user.name";
|
||||||
|
case NOTMUCH_CONFIG_AUTOCOMMIT:
|
||||||
|
return "database.autocommit";
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -638,6 +640,8 @@ _notmuch_config_default (notmuch_database_t *notmuch, notmuch_config_key_t key)
|
||||||
return email;
|
return email;
|
||||||
case NOTMUCH_CONFIG_NEW_IGNORE:
|
case NOTMUCH_CONFIG_NEW_IGNORE:
|
||||||
return "";
|
return "";
|
||||||
|
case NOTMUCH_CONFIG_AUTOCOMMIT:
|
||||||
|
return "8000";
|
||||||
case NOTMUCH_CONFIG_HOOK_DIR:
|
case NOTMUCH_CONFIG_HOOK_DIR:
|
||||||
case NOTMUCH_CONFIG_BACKUP_DIR:
|
case NOTMUCH_CONFIG_BACKUP_DIR:
|
||||||
case NOTMUCH_CONFIG_OTHER_EMAIL:
|
case NOTMUCH_CONFIG_OTHER_EMAIL:
|
||||||
|
|
|
@ -2520,6 +2520,7 @@ typedef enum _notmuch_config_key {
|
||||||
NOTMUCH_CONFIG_PRIMARY_EMAIL,
|
NOTMUCH_CONFIG_PRIMARY_EMAIL,
|
||||||
NOTMUCH_CONFIG_OTHER_EMAIL,
|
NOTMUCH_CONFIG_OTHER_EMAIL,
|
||||||
NOTMUCH_CONFIG_USER_NAME,
|
NOTMUCH_CONFIG_USER_NAME,
|
||||||
|
NOTMUCH_CONFIG_AUTOCOMMIT,
|
||||||
NOTMUCH_CONFIG_LAST
|
NOTMUCH_CONFIG_LAST
|
||||||
} notmuch_config_key_t;
|
} notmuch_config_key_t;
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ cat <<EOF > EXPECTED
|
||||||
built_with.compact=something
|
built_with.compact=something
|
||||||
built_with.field_processor=something
|
built_with.field_processor=something
|
||||||
built_with.retry_lock=something
|
built_with.retry_lock=something
|
||||||
|
database.autocommit=8000
|
||||||
database.mail_root=MAIL_DIR
|
database.mail_root=MAIL_DIR
|
||||||
database.path=MAIL_DIR
|
database.path=MAIL_DIR
|
||||||
foo.list=this;is another;list value;
|
foo.list=this;is another;list value;
|
||||||
|
|
|
@ -259,6 +259,7 @@ EOF
|
||||||
built_with.compact=true
|
built_with.compact=true
|
||||||
built_with.field_processor=true
|
built_with.field_processor=true
|
||||||
built_with.retry_lock=true
|
built_with.retry_lock=true
|
||||||
|
database.autocommit=8000
|
||||||
database.backup_dir
|
database.backup_dir
|
||||||
database.hook_dir
|
database.hook_dir
|
||||||
database.mail_root=MAIL_DIR
|
database.mail_root=MAIL_DIR
|
||||||
|
|
|
@ -419,6 +419,7 @@ cat <<'EOF' >EXPECTED
|
||||||
08: 'USERNAME@FQDN'
|
08: 'USERNAME@FQDN'
|
||||||
09: 'NULL'
|
09: 'NULL'
|
||||||
10: 'USER_FULL_NAME'
|
10: 'USER_FULL_NAME'
|
||||||
|
11: '8000'
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
unset MAILDIR
|
unset MAILDIR
|
||||||
|
@ -730,6 +731,7 @@ cat <<'EOF' >EXPECTED
|
||||||
08: 'test_suite@notmuchmail.org'
|
08: 'test_suite@notmuchmail.org'
|
||||||
09: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
|
09: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
|
||||||
10: 'Notmuch Test Suite'
|
10: 'Notmuch Test Suite'
|
||||||
|
11: '8000'
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
@ -762,6 +764,7 @@ cat <<'EOF' >EXPECTED
|
||||||
08: 'USERNAME@FQDN'
|
08: 'USERNAME@FQDN'
|
||||||
09: 'NULL'
|
09: 'NULL'
|
||||||
10: 'USER_FULL_NAME'
|
10: 'USER_FULL_NAME'
|
||||||
|
11: '8000'
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT.clean
|
test_expect_equal_file EXPECTED OUTPUT.clean
|
||||||
|
@ -828,6 +831,7 @@ EOF
|
||||||
cat <<'EOF' >EXPECTED
|
cat <<'EOF' >EXPECTED
|
||||||
== stdout ==
|
== stdout ==
|
||||||
aaabefore beforeval
|
aaabefore beforeval
|
||||||
|
database.autocommit 8000
|
||||||
database.backup_dir MAIL_DIR/.notmuch/backups
|
database.backup_dir MAIL_DIR/.notmuch/backups
|
||||||
database.hook_dir MAIL_DIR/.notmuch/hooks
|
database.hook_dir MAIL_DIR/.notmuch/hooks
|
||||||
database.mail_root MAIL_DIR
|
database.mail_root MAIL_DIR
|
||||||
|
|
Loading…
Reference in a new issue