aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-18test: add known broken test for long directory bugDavid Bremner
In [1] Gregor Zattler explained the results of his hard work tracking down a bug in notmuch with long directories. This test duplicates the bug. [1]: id:20210317194728.GB5561@no.workgroup
2021-03-13lib/open: free GKeyFileDavid Bremner
This fixes a small-to-medium (depending on size of config file) memory leak.
2021-03-13lib/config: free memory from traversing GKeyFileDavid Bremner
This fixes a few small memory leaks.
2021-03-13lib/open: free value from g_key_file_get_valueDavid Bremner
This fixes a small memory leak.
2021-03-13lib/open: use local talloc context in n_d_create_with_configDavid Bremner
This better matches the memory allocation semantics in notmuch_database_open_with_config.
2021-03-13cli: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config devel/uncrustify.cfg *.c *.h in the top level source directory Line breaks were then adjusted manually to keep argc and argv together.
2021-03-13test: run uncrustifyuncrustify
This is the result of running: $ uncrustify --replace --config ../devel/uncrustify.cfg *.cc *.c *.h in the test directory.
2021-03-13util: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h in the util directory
2021-03-13lib: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h *.cc in the lib directory
2021-03-12test: clean up some extra whitespace.David Bremner
The extra space is mainly just untidy.
2021-03-12test: T020-compact.sh: fix work directory locationTomi Ollila
Fix use of $TEST_DIRECTORY ($NOTMUCH_BUILDDIR/test/) with use of $TMP_DIRECTORY ($NOTMUCH_BUILDDIR/test/tmp.T020-compact/ in case of T020-compact.sh) as root directory where to write test files and directories.
2021-03-12devel/uncrustify: add line length limits.David Bremner
A generous limit of 102 is chosen to moderate the amount of resulting reformatting.
2021-02-18Merge tag '0.31.4'David Bremner
notmuch 0.31.4 release
2021-02-18debian: drop patchesdebian/0.31.4-1archive/debian/0.31.4-10.31.4David Bremner
we should by synced up with the tarball again
2021-02-18doc: bump copyright yearDavid Bremner
2021-02-18debian: changelog for 0.31.4-1David Bremner
2021-02-18NEWS: news for 0.31.4David Bremner
2021-02-18version: update to 0.31.4David Bremner
2021-02-18test: Fix race condition in T568-lib-thread.shDavid Bremner
The assignment of thread-ids is (apparently) non-deterministic in a way that mostly seems to show up on multicore machines. In my tests the number is different from that previously assumed by this test about 15% of the time on a 50 thread (25 core) Xeon. Since message id's are fixed, use a message known to be in the thread of interest to pick out the correct thread-id.
2021-02-15fix build failure with glib 2.67David Bremner
Based on a patch from Michael J Gruber [1]. As of glib 2.67 (more specifically [2]), including "gmime-extra.h" inside an extern "C" block causes build failures, because glib is using C++ features. Observing that "gmime-extra.h" is no longer needed in notmuch-private.h, which can simply delete that include, but we have to correspondingly move the includes which might include it (in particular crypto.h) out of the extern "C" block also. This seems less fragile than only moving gmime-extra, and relying on preprocessor sentinels to keep the deeper includes from happening. Move to the include to the outside of the extern block. [1]: id:aee618a3d41f7889a7449aa16893e992325a909a.1613055071.git.git@grubix.eu [2]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715
2021-02-15python: convert shebangs to python3Daniel Kahn Gillmor
This is the last bit of "python" left in the notmuch codebase. https://www.python.org/dev/peps/pep-0394/#recommendation encourages "third-party distributors" to use more-specific shebang lines. I'm not certain that the notmuch project itself is a "third-party contributor" but I think this is a safe way to encourage people to use python3 when they're developing notmuch. We already have python3 explicitly elsewhere in the codebase for developers (in nmbug). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2021-02-14lib: use a stricter unused macroDavid Bremner
This would have caught bugs like the one corrected in the previous commit.
2021-02-14lib/open: remove incorrect unused attributeDavid Bremner
With the current unused macro in lib/notmuch-private.h this seems harmless, but is misleading, since the parameter is in fact used.
2021-02-06lib: add missing private status values.David Bremner
Many public status values have been added without being copied to the list of private status values.
2021-02-06doc: describe new config frameworkDavid Bremner
Remove STORED IN DATABASE discussion, describe search rules. Currently profiles seem a bit pointless. They will make more sense when they apply to databases as well.
2021-02-06CLI: use configured hook directoryDavid Bremner
This enables support for hooks outside the database directory. It relies strongly on configuration information being usable between closing the database and destroying it.
2021-02-06lib/open: set HOOK_DIR on openDavid Bremner
This is a simple two step path search. Most error checking is deferred until running the hooks.
2021-02-06lib/config: add HOOK_DIRDavid Bremner
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.
2021-02-06cli/new: convert to new config frameworkDavid Bremner
In addition to the same type of changes as converting other subcommands, add the possibility of creating a database at the top level. It would probably make sense to use this for insert as well.
2021-02-06cli/new: refactor database upgrade codeDavid Bremner
Move to a separate function. This is essentially just code movement.
2021-02-06lib: introduce notmuch_database_create_with_configDavid Bremner
This takes a config path parameter, and can use that to decide the new database location.
2021-02-06lib: add NOTMUCH_STATUS_DATABASE_EXISTSDavid Bremner
It is desirable to distinguish between attempting to create a database that already exists, and more fatal errors like permission problems.
2021-02-06lib/database: move n_d_create* to open.ccDavid Bremner
This will help share code with n_d_open_with_config.
2021-02-06lib: add NOTMUCH_STATUS_NO_CONFIGDavid Bremner
This will allow client code to provide more meaningful diagnostics. In particular it will enable "notmuch new" to continue suggsting the user run "notmuch setup" to create a config after "notmuch new" is transitioned to the new configuration framework.
2021-02-06lib/open: factor out choosing database pathDavid Bremner
The plan is to share code with a new database creation function that has a similar API to n_d_open_with_config.
2021-02-06lib/config: add NOTMUCH_CONFIG_NEW_IGNOREDavid Bremner
This will be needed by (at least) the conversion of notmuch-new.c to the new config framework
2021-02-06bindings/notmuch2: add missing crypto error status codesDavid Bremner
These are needed so that the later codes line up numerically.
2021-02-06cli/compact: convert to new configuration frameworkDavid Bremner
Switch to the newly created API function notmuch_database_compact_db, which takes the database opened in main().
2021-02-06lib: split notmuch_database_compactDavid Bremner
The "back end" function takes an open notmuch database, which should know its own path (i.e. the path needs to be cached in the configuration data).
2021-02-06lib/config: add _notmuch_config_cacheDavid Bremner
This is a simple convenience routine to cache a configuration value without writing it to the database.
2021-02-06cli/tag: convert to new config framework.David Bremner
In addition to changing configuration access, change talloc context for allocation.
2021-02-06CLI/show: mostly switch show to new config frameworkDavid Bremner
This will need some cleanup when the transition completes, and we stop passing notmuch_config_t structs to the subcommands. Unlike the general case, we open the database in the subcommand, since we don't know whether it should be opened read/write until we parse the command line arguments. Add a test to make sure passing config file on the command line is not broken by these or future config related changes.
2021-02-06cli/config: add accessor for config file nameDavid Bremner
This is intended for use in temporary code transitioning to the new configuration system. The name is chosen to avoid cluttering the notmuch_config_* namespace further with non-library functions.
2021-02-06CLI/{search,address}: convert to new configuration frameworkDavid Bremner
Since we are already passing a search context around as a kind of parameter block, add a new talloc context to that to replace relying on 'config'. Convert notmuch-search and notmuch-address at the same time, because they share some code. Add a test to make sure we don't break passing configuration as a command line argument.
2021-02-06CLI/reply: convert to new config frameworkDavid Bremner
This is messier than some of the other conversions because the extensive use of 'config' as a talloc context.
2021-02-06cli/reindex: convert new config frameworkDavid Bremner
The only non-trivial part is switching the talloc context for query_string_from args from 'config' to 'notmuch'.
2021-02-06CLI/insert: convert to new config framework.David Bremner
The new talloc context is needed to run the hook at the very end of the function. That in turn is needed so that this process gives up the write lock on the database.
2021-02-06CLI/restore: convert to new config frameworkDavid Bremner
Switch one configuration check to new n_c_get_bool function, and switch use of config as talloc context to notmuch.
2021-02-06lib: add notmuch_config_get_boolDavid Bremner
Booleans have no out of band values, so return a status for errors.
2021-02-06cli/dump: convert to new config frameworkDavid Bremner
This conversion is trivial because the only configuration information accessed by dump is that stored in the database (in order to dump it). We do need to be careful to keep the write lock on the database to ensure dump consistency.