From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org, David Edmondson <dme@dme.org>
Subject: [PATCH] cli: notmuch search --duplicate=N is only supported with --output=files
Date: Wed, 29 Oct 2014 21:30:43 +0200 [thread overview]
Message-ID: <1414611043-3498-1-git-send-email-jani@nikula.org> (raw)
In-Reply-To: <cunr3xqolg8.fsf@gargravarr.hh.sledj.net>
Check the supported combination, and bail out for other combinations.
---
notmuch-search.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/notmuch-search.c b/notmuch-search.c
index bc9be4593ecc..3bb5a7fbc885 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -387,6 +387,11 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])
if (opt_index < 0)
return EXIT_FAILURE;
+ if (output != OUTPUT_FILES && dupe != -1) {
+ fprintf (stderr, "Error: --duplicate=N is only supported with --output=files.\n");
+ return EXIT_FAILURE;
+ }
+
switch (format_sel) {
case NOTMUCH_FORMAT_TEXT:
format = sprinter_text_create (config, stdout);
--
2.1.1
next prev parent reply other threads:[~2014-10-29 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 17:05 "search --duplicate=2 --output=messages" is deranged David Edmondson
2014-10-29 19:30 ` Jani Nikula [this message]
2014-10-30 8:19 ` [PATCH] cli: notmuch search --duplicate=N is only supported with --output=files David Edmondson
2014-10-30 21:44 ` [PATCH] cli: add support for notmuch search --duplicate=N with --output=messages Jani Nikula
2014-10-31 7:14 ` David Edmondson
2014-11-25 19:49 ` "search --duplicate=2 --output=messages" is deranged David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414611043-3498-1-git-send-email-jani@nikula.org \
--to=jani@nikula.org \
--cc=dme@dme.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).