aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-21config: test whether an item is stored in the database by nameDaniel Kahn Gillmor
QUERY_STRING was only used in two places, both to test whether a variable should be stored in (or retrieved from) the database. Since other configuration variables might be stored in the database in the future, consolidate that test into a single function. We also document that these configuration options should not be placed in the config file.
2017-10-21crypto: index encrypted parts when indexopts try_decrypt is set.Daniel Kahn Gillmor
If we see index options that ask us to decrypt when indexing a message, and we encounter an encrypted part, we'll try to descend into it. If we can decrypt, we add the property index.decryption=success. If we can't decrypt (or recognize the encrypted type of mail), we add the property index.decryption=failure. Note that a single message may have both values of the "index.decryption" property: "success" and "failure". For example, consider a message that includes multiple layers of encryption. If we manage to decrypt the outer layer ("index.decryption=success"), but fail on the inner layer ("index.decryption=failure"). Because of the property name, this will be automatically cleared (and possibly re-set) during re-indexing. This means it will subsequently correspond to the actual semantics of the stored index.
2017-10-21reindex: drop all properties named with prefix "index."Daniel Kahn Gillmor
This allows us to create new properties that will be automatically set during indexing, and cleared during re-indexing, just by choice of property name.
2017-10-21doc: add notmuch-properties(7)Daniel Kahn Gillmor
We will want a user-facing place to record details about the use of notmuch properties shortly. This establishes a new manual page for that purpose.
2017-10-21index: implement notmuch_indexopts_t with try_decryptDaniel Kahn Gillmor
This is currently mostly a wrapper around _notmuch_crypto_t that keeps its internals private and doesn't expose any of the GMime API. However, non-crypto indexing options might also be added later (e.g. filters or other transformations).
2017-10-21build: don't copy the test directory for out-of-tree buildsJani Nikula
It should now work without.
2017-10-21test: use source path in add_gnupg_homeJani Nikula
Make a distinction between source and build directories.
2017-10-21test: remove --root option and fix TMP_DIRECTORY cleanupJani Nikula
The primary motivation here is to fix TMP_DIRECTORY cleanup prior to running each test when the current working directory is not the test subdirectory. Tests with failures would leave their TMP_DIRECTORY directory behind for debugging, and repeated out-of-tree test runs would have old temp directories. (This lead to e.g. T310-emacs.sh hanging because emacs would prompt for overwriting files.) We remove the likely anyway defunct --root test option while at it, just to be on the safe side when doing 'rm -rf' on the TMP_DIRECTORY.
2017-10-20test: use source and build paths in T590-thread-breakage.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T480-hex-escaping.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T4?0-emacs-*.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T380-atomicity.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T360-symbol-hiding.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T355-smime.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T310-emacs.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T260-thread-order.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T160-json.sh and T170-sexp.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in T000-basic.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in notmuch-testJani Nikula
Make a distinction between source and build directories.
2017-10-20test: mkdir and cd to $TMP_DIRECTORY instead of $test for testingJani Nikula
$TMP_DIRECTORY is a full path, while $test is not.
2017-10-20test: use source and build paths in test-lib-common.shJani Nikula
Make a distinction between source and build directories. The expectation is that anyone sourcing test-lib-common.sh has sourced export-dirs.sh.
2017-10-20perf-test: use source and build paths in perf-test-lib.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: use source and build paths in test-lib.shJani Nikula
Make a distinction between source and build directories.
2017-10-20test: add a script to figure out source and build directoriesJani Nikula
Expect the tests to be run somewhere in the build directory hierarchy. Allow for source and build directories to be passed through the environment.
2017-10-20test: check for notmuch binary in test-lib.shJani Nikula
Move notmuch executable check into common code. Redundant for notmuch-test runs, but works also for individual tests.
2017-10-20perf-test: use $(dirname "$0") for sourcing perf-test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2017-10-20test: use $(dirname "$0") for sourcing test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2017-10-20build: use NOTMUCH_SRCDIR for referencing notmuch-testJani Nikula
Don't assume the tests are always run from within the source tree.
2017-10-20test: use corpora/default not corpus in T480-hex-escaping.shJani Nikula
Turns out round trip tests didn't really round trip anything. Broken by yours truly in 971cdc72cdb8 ("test: make it possible to have multiple corpora"). Ooops.
2017-10-20properties: add notmuch_message_remove_all_properties_with_prefix()Daniel Kahn Gillmor
Subsequent patches will introduce a convention that properties whose name starts with "index." will be stripped (and possibly re-added) during re-indexing. This patch lays the groundwork for doing that.
2017-10-20crypto: make shared crypto code behave library-likeDaniel Kahn Gillmor
If we're going to reuse the crypto code across both the library and the client, then it needs to report error states properly and not write to stderr.
2017-10-20crypto: move into libnotmuch_utilDaniel Kahn Gillmor
This prepares us for using the crypto object in both libnotmuch and the client.
2017-10-18doc: make SEE ALSO references one-per-lineDaniel Kahn Gillmor
This will make future diffs cleaner, make it easier to keep them alphabetical, and make it easier to scan and search the documentation sources.
2017-10-18doc: fix documentation typos and copy/paste-osDaniel Kahn Gillmor
2017-10-15cli: make notmuch count --exclude a boolean argumentJani Nikula
Commit 0f314c0c99be ("cli: convert notmuch_bool_t to stdbool") over-eagerly converted EXCLUDE_TRUE and EXCLUDE_FALSE to EXCLUDE_true and EXCLUDE_false in notmuch-count.c. We could just fix the case back, but convert the option to an actual boolean argument instead. We've used a keyword argument rather than a boolean argument for notmuch count --exclude for five years, since commit 785c1e497f05 ("cli: move count to the new --exclude=(true|false|flag) naming scheme."), "to allow future options to be added more easily". I think we can conclude future options aren't coming any time soon.
2017-10-14gmime-extra: drop compat layer for g_mime_multipart_encrypted_decryptDaniel Kahn Gillmor
In practice, we're going to see this function invoked differently depending on which gmime we build against. The compatibility layer forces our code into the lowest-common-denominator -- unable to make use of new features even when built against a newer version. Dropping the compatibility layer paves the way for clearer use of features from GMime 3.0 in future commits.
2017-10-14tests: prepare for more crypto tests (using add_gnupg_home)Daniel Kahn Gillmor
Move add_gnupg_home to test-lib.sh to prepare it for reuse.
2017-10-12gmime-extra: remove duplicate GMimeAddressType typedefDaniel Kahn Gillmor
"typedef GMimeAddressType GMimeRecipientType" is already present further down in the compatibility wrapper (with other typedefs). We don't need it twice.
2017-10-12crypto: _notmuch_crypto_cleanup should return voidDaniel Kahn Gillmor
There's no chance that _notmuch_crypto_cleanup() will ever return anything other than 0, and no one ever checks its return value anyway. So make it return void instead of int.
2017-10-12crypto: drop pretense of notmuch_crypto_context_tDaniel Kahn Gillmor
notmuch_crypto_context_t was introduced (i think) as some sort of abstraction layer to make notmuch somewhat independent of GMime. But it isn't even useful for GMime 3.0 or later -- we can drop the pretense that it's some sort of abstraction in this case, and just call it what it is, GMimeCryptoContext, which is useful for building against older versions of GMime. This also renames _notmuch_crypto_get_context() to _notmuch_crypto_get_gmime_context().
2017-10-12crypto: rename notmuch_crypto_t to _notmuch_crypto_tDaniel Kahn Gillmor
The notmuch_crypto_t struct isn't used externally, and we have no plans to explicitly export it. Prefix its name (and associated functions) with _ to make that intent clear.
2017-10-09lib: convert notmuch_bool_t to stdbool internallyJani Nikula
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the lib internally to stdbool.
2017-10-09cli: convert notmuch_bool_t to stdboolJani Nikula
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the cli and test binaries to stdbool.
2017-10-05devel/check-out-of-tree-build.sh: consistent naming, consistent quotingTomi Ollila
Renamed from out-of-tree-build-check.sh to be consistent with other files in this directory. Fixed quoting in "$srcdir" usage for additional robustness, other quoting changes for consistency.
2017-10-04cli: reduce indent in keyword argument processingJani Nikula
Reducing indent makes future changes easier. No functional changes.
2017-10-04cli: change while to for in keyword argument processingJani Nikula
Using a for loop makes it easier to use continue, in preparation for future changes. No functional changes.
2017-10-04cli: refactor boolean argument processingJani Nikula
Clean up the control flow to prepare for future changes. No functional changes.
2017-10-04cli: use notmuch_bool_t for boolean argument in showJani Nikula
Pedantically correct, although they're the same underlying type.
2017-10-04hex-xcode: use notmuch_bool_t for boolean argumentsJani Nikula
Pedantically correct, although they're the same underlying type.
2017-10-04cli: use the arg parser .present feature to handle show --entire-threadJani Nikula
The --entire-thread default depends on other arguments, so we'll have to figure out if it was explicitly set by the user or not. The arg parser .present feature helps us clean up the code here.