X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-dump.c;h=0475eb9d1a2d822109a5c71ab6122d096f0d0151;hb=9e805b6a5894c4e42deb78ad33523e550d157c75;hp=ac5d0742e0f9c61d74eca06633e199ee13491f47;hpb=09beff1def1daa9887679723205855ff7da8a297;p=notmuch diff --git a/notmuch-dump.c b/notmuch-dump.c index ac5d0742..0475eb9d 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -41,7 +41,10 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (notmuch == NULL) return 1; + argc--; argv++; /* skip subcommand argument */ + if (argc && strcmp (argv[0], "--") != 0) { + fprintf (stderr, "Warning: the output file argument of dump is deprecated.\n"); output = fopen (argv[0], "w"); if (output == NULL) { fprintf (stderr, "Error opening %s for writing: %s\n", @@ -70,7 +73,10 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) fprintf (stderr, "Out of memory\n"); return 1; } - notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID); + /* Don't ask xapian to sort by Message-ID. Xapian optimizes returning the + * first results quickly at the expense of total time. + */ + notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED); for (messages = notmuch_query_search_messages (query); notmuch_messages_valid (messages);