X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=44e582cbf416acb42f683609fd9f2491c6dca035;hp=2eaad32f2abbbeee75eea79fb4f34a1ddb4f83d7;hb=81bd41c7cb59a8d70932e6bdbee6e1e2cde5477f;hpb=64b155842a87c228c45ec20fb163891695e6ccc2 diff --git a/notmuch-search.c b/notmuch-search.c index 2eaad32f..44e582cb 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -883,6 +883,11 @@ notmuch_address_command (notmuch_config_t *config, int argc, char *argv[]) _talloc_free_for_g_hash, _list_free_for_g_hash); + /* The order is not guaranteed if a full pass is required, so go + * for fastest. */ + if (ctx->output & OUTPUT_COUNT || ctx->dedup == DEDUP_ADDRESS) + notmuch_query_set_sort (ctx->query, NOTMUCH_SORT_UNSORTED); + ret = do_search_messages (ctx); g_hash_table_unref (ctx->addresses);