notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
   commit b52df7e730773e8daf81aab5c0070b710d54dd2f (patch)
   parent c1c65c34 WIP fixes for saving config path
     tree dcd2aca709908706098802d7a23b2f445830b8f3
   author David Bremner <david@tethera.net>  2021-02-25 08:00:26 -0400
committer David Bremner <david@tethera.net>  2021-02-25 08:00:26 -0400

WIP: set and get config with split configuration

---
 notmuch.c                | 3 +++
 test/T055-path-config.sh | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/notmuch.c b/notmuch.c
index fa6b7eaa..b73a853c 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -565,6 +565,9 @@ main (int argc, char *argv[])
     }
 
     if (command->mode & NOTMUCH_COMMAND_CONFIG_OPEN) {
+	if (! config_file_name)
+	    config_file_name = notmuch_config_path (notmuch);
+
 	config = notmuch_config_open (notmuch, config_file_name, command->mode);
 	if (! config) {
 	    ret = EXIT_FAILURE;
diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index 0a34e67f..4805554b 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -215,7 +215,11 @@ EOF
 
    test_expect_equal_file EXPECTED OUTPUT
 
-    restore_config
+   test_begin_subtest "Set config value ($config)"
+   notmuch config set foo.string "this is a string value"
+   test_expect_equal "$(notmuch config get foo.string)" "this is a string value"
+
+   restore_config
 done
 
 test_done


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

git clone https://yhetil.org/notmuch.git