Re: [PATCH v3 1/2] cli: make --entire-thread=false work for format=json.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Sat, 21 Apr 2012 18:10:14 +0000 (12:10 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:36 +0000 (09:46 -0800)
bc/9662310024fd2f43b1bf46e506145952e7b974 [new file with mode: 0644]

diff --git a/bc/9662310024fd2f43b1bf46e506145952e7b974 b/bc/9662310024fd2f43b1bf46e506145952e7b974
new file mode 100644 (file)
index 0000000..43c7f8d
--- /dev/null
@@ -0,0 +1,88 @@
+Return-Path: <awg@xvx.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6A297431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 11:10:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id gv3YqfzTMyUY for <notmuch@notmuchmail.org>;\r
+       Sat, 21 Apr 2012 11:10:18 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A14A8431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 11:10:17 -0700 (PDT)\r
+Received: by lahc1 with SMTP id c1so8318000lah.26\r
+       for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 11:10:14 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :x-gm-message-state;\r
+       bh=P7eeEiRfvJVApTuhu6BVTfFJo31L5Ph91NEeiWBBtZQ=;\r
+       b=n4fAUCWQPaCy7uzQbNIpNfww7wdPHWzQ6ZbPylXOLcmbB2wI/DoocxxNG95f/hTogM\r
+       1gQqy66gwbz4wTq61z+vdKsJBaMm3Rc8XtH59lCFddl0rS+RAn8mQ+P9BVgJLWQ7g6zR\r
+       9mjkqEL6my9ZqSgAdCjrRaIhmiuqUwpv7ps3CnMOQJ5G5u005ADMhIsXbwWTjOdfxKZr\r
+       6VhZvKJXuAQFs3yM0WcYCdaiy2niG09PEE3k0Zy0UIfR842tz8yA5REpfRmIAEF4n1pA\r
+       fw1bzsCKm+HV7r2t2N7xYvewrkLi8D/49g6EjzWs0rFc9q6tY3An/IsyMnUpND8KPoyH\r
+       MoDw==\r
+MIME-Version: 1.0\r
+Received: by 10.152.148.234 with SMTP id tv10mr824143lab.41.1335031814464;\r
+       Sat, 21 Apr 2012 11:10:14 -0700 (PDT)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.23.39 with HTTP; Sat, 21 Apr 2012 11:10:14 -0700 (PDT)\r
+X-Originating-IP: [96.52.216.56]\r
+In-Reply-To: <1334999750-21811-2-git-send-email-markwalters1009@gmail.com>\r
+References: <1334999750-21811-1-git-send-email-markwalters1009@gmail.com>\r
+       <1334999750-21811-2-git-send-email-markwalters1009@gmail.com>\r
+Date: Sat, 21 Apr 2012 12:10:14 -0600\r
+X-Google-Sender-Auth: 4khZu3ep2u4JL-49XDPYmCiFwZI\r
+Message-ID:\r
+ <CAMoJFUvOU1OzqPn7eCNMfECuFm+09B+YSkivTX79VTQJ6_wSjg@mail.gmail.com>\r
+Subject: Re: [PATCH v3 1/2] cli: make --entire-thread=false work for\r
+       format=json.\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+X-Gm-Message-State:\r
+ ALoCoQkjgyOOJ3hpvrO5qWPE9ayV6kZNwyoyB76Nqb2evgB+VxD29bratKrgW7RGBKX/MF8JO3we\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 21 Apr 2012 18:10:18 -0000\r
+\r
+On Sat, Apr 21, 2012 at 03:15, Mark Walters <markwalters1009@gmail.com> wrote:\r
+> The --entire-thread option in notmuch-show.c defaults to true when\r
+> format=json. Previously there was no way to turn this off. This patch\r
+> makes it respect --entire-thread=false.\r
+>\r
+> The one subtlety is that we initialise a notmuch_bool_t to -1 to\r
+> indicate that the option parsing has not set it. This allows the code\r
+> to distinguish between the option being omitted from the command line,\r
+> and the option being set to false on the command line.\r
+>\r
+> Finally, all formats except Json can output empty messages for non\r
+> entire-thread, but in Json format we need to output {} to keep the\r
+> other elements (e.g. the replies to this message) in the correct\r
+> place.\r
+\r
+LGTM. You can probably remove the relevant item from devel/TODO as well!\r
+\r
+-- Adam\r