| Age | Commit message (Collapse) | Author |
|
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
|
|
This fixes a small-to-medium (depending on size of config file) memory
leak.
|
|
This fixes a few small memory leaks.
|
|
This fixes a small memory leak.
|
|
This better matches the memory allocation semantics in
notmuch_database_open_with_config.
|
|
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.
|
|
This is the result of running:
$ uncrustify --replace --config ../devel/uncrustify.cfg *.cc *.c *.h
in the test directory.
|
|
This is the result of running
$ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h
in the util directory
|
|
This is the result of running
$ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h *.cc
in the lib directory
|
|
The extra space is mainly just untidy.
|
|
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.
|
|
A generous limit of 102 is chosen to moderate the amount of resulting
reformatting.
|
|
notmuch 0.31.4 release
|
|
we should by synced up with the tarball again
|
|
|
|
|
|
|
|
|
|
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.
|
|
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
|
|
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>
|
|
This would have caught bugs like the one corrected in the previous commit.
|
|
With the current unused macro in lib/notmuch-private.h this seems
harmless, but is misleading, since the parameter is in fact used.
|
|
Many public status values have been added without being copied to the
list of private status values.
|
|
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.
|
|
This enables support for hooks outside the database directory.
It relies strongly on configuration information being usable between
closing the database and destroying it.
|
|
This is a simple two step path search. Most error checking is
deferred until running the hooks.
|
|
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.
|
|
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.
|
|
Move to a separate function. This is essentially just code movement.
|
|
This takes a config path parameter, and can use that to decide the
new database location.
|
|
It is desirable to distinguish between attempting to create a database
that already exists, and more fatal errors like permission problems.
|
|
This will help share code with n_d_open_with_config.
|
|
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.
|
|
The plan is to share code with a new database creation function that
has a similar API to n_d_open_with_config.
|
|
This will be needed by (at least) the conversion of notmuch-new.c to
the new config framework
|
|
These are needed so that the later codes line up numerically.
|
|
Switch to the newly created API function notmuch_database_compact_db,
which takes the database opened in main().
|
|
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).
|
|
This is a simple convenience routine to cache a configuration value
without writing it to the database.
|
|
In addition to changing configuration access, change talloc context
for allocation.
|
|
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.
|
|
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.
|
|
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.
|
|
This is messier than some of the other conversions because the
extensive use of 'config' as a talloc context.
|
|
The only non-trivial part is switching the talloc context for
query_string_from args from 'config' to 'notmuch'.
|
|
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.
|
|
Switch one configuration check to new n_c_get_bool function, and
switch use of config as talloc context to notmuch.
|
|
Booleans have no out of band values, so return a status for errors.
|
|
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.
|