From: David Bremner <bremner@debian.org> --- After some chatter on IRC, Mark and I converged to the following notmuch-restore.c | 2 +- tag-util.c | 2 +- tag-util.h | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 112f2f3..1b66e76 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -208,7 +208,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) if (input_format == DUMP_FORMAT_SUP) { ret = parse_sup_line (ctx, line, &query_string, tag_ops); } else { - ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_ONLY, + ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_DIRECT, &query_string, tag_ops); } diff --git a/tag-util.c b/tag-util.c index 8fea76c..37bffd5 100644 --- a/tag-util.c +++ b/tag-util.c @@ -201,7 +201,7 @@ parse_tag_line (void *ctx, char *line, } /* tok now points to the query string */ - if (flags & TAG_FLAG_ID_ONLY) { + if (flags & TAG_FLAG_ID_DIRECT) { /* this is under the assumption that any whitespace in the * message-id must be hex-encoded. The check is probably not * perfect for exotic unicode whitespace; as fallback the diff --git a/tag-util.h b/tag-util.h index 7674051..eec00cf 100644 --- a/tag-util.h +++ b/tag-util.h @@ -28,8 +28,10 @@ typedef enum { */ TAG_FLAG_BE_GENEROUS = (1 << 3), - /* Query consists of a single id:$message-id */ - TAG_FLAG_ID_ONLY = (1 << 4) + /* Directly look up messages by hex-decoded message-id, rather + * than parsing a general query. The query MUST be of the form + * id:$message-id. */ + TAG_FLAG_ID_DIRECT = (1 << 4) } tag_op_flag_t; -- 1.7.10.4