diff options
author | David Bremner <david@tethera.net> | 2021-01-09 09:19:50 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2021-02-06 19:54:09 -0400 |
commit | 4922416cccb826483e8306461a15a7372e97d3ce (patch) | |
tree | 5556d1759ad2a2ae2198481e7de62bbcc852df4c | |
parent | 0d3bef312dd624225825e6fe175ea8830c1c9e39 (diff) |
lib/config: add HOOK_DIR
The hook directory configuration needs to be kept in synch with the
other configuration information, so add scaffolding to support this at
database opening time.
-rw-r--r-- | lib/config.cc | 3 | ||||
-rw-r--r-- | lib/notmuch.h | 1 | ||||
-rwxr-xr-x | test/T590-libconfig.sh | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/lib/config.cc b/lib/config.cc index 4c0cfe92..948751bc 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -390,6 +390,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key) { switch (key) { case NOTMUCH_CONFIG_DATABASE_PATH: return "database.path"; + case NOTMUCH_CONFIG_HOOK_DIR: + return "database.hook_dir"; case NOTMUCH_CONFIG_EXCLUDE_TAGS: return "search.exclude_tags"; case NOTMUCH_CONFIG_NEW_TAGS: @@ -428,6 +430,7 @@ _notmuch_config_default (void *ctx, notmuch_config_key_t key) { return "inbox;unread"; case NOTMUCH_CONFIG_SYNC_MAILDIR_FLAGS: return "true"; + case NOTMUCH_CONFIG_HOOK_DIR: case NOTMUCH_CONFIG_NEW_IGNORE: case NOTMUCH_CONFIG_USER_NAME: case NOTMUCH_CONFIG_PRIMARY_EMAIL: diff --git a/lib/notmuch.h b/lib/notmuch.h index 5e07a01a..5a5d99c0 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -2460,6 +2460,7 @@ notmuch_config_list_destroy (notmuch_config_list_t *config_list); typedef enum _notmuch_config_key { NOTMUCH_CONFIG_FIRST, NOTMUCH_CONFIG_DATABASE_PATH = NOTMUCH_CONFIG_FIRST, + NOTMUCH_CONFIG_HOOK_DIR, NOTMUCH_CONFIG_EXCLUDE_TAGS, NOTMUCH_CONFIG_NEW_TAGS, NOTMUCH_CONFIG_NEW_IGNORE, diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 4edc53f1..e2050b50 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -333,6 +333,7 @@ EOF cat <<'EOF' >EXPECTED == stdout == MAIL_DIR +NULL inbox;unread NULL |