]> git.notmuchmail.org Git - notmuch/blobdiff - tag-util.c
test: test notmuch search --duplicate=N
[notmuch] / tag-util.c
index c5f585950921af59659dddf8d635c95ae1853a2c..3bde4097372ab827e91e23ff963f6c5413652f9b 100644 (file)
@@ -165,8 +165,6 @@ parse_tag_command_line (void *ctx, int argc, char **argv,
 
     int i;
 
-    tag_op_list_reset (tag_ops);
-
     for (i = 0; i < argc; i++) {
        if (strcmp (argv[i], "--") == 0) {
            i++;
@@ -190,9 +188,9 @@ parse_tag_command_line (void *ctx, int argc, char **argv,
 
     *query_str = query_string_from_args (ctx, argc - i, &argv[i]);
 
-    if (*query_str == NULL || **query_str == '\0') {
-       fprintf (stderr, "Error: notmuch tag requires at least one search term.\n");
-       return TAG_PARSE_INVALID;
+    if (*query_str == NULL) {
+       fprintf (stderr, "Out of memory.\n");
+       return TAG_PARSE_OUT_OF_MEMORY;
     }
 
     return TAG_PARSE_SUCCESS;