[PATCH v3 1/2] cli: make --entire-thread=false work for format=json.
Adam Wolfe Gordon
awg+notmuch at xvx.ca
Sat Apr 21 11:10:14 PDT 2012
On Sat, Apr 21, 2012 at 03:15, Mark Walters <markwalters1009 at gmail.com> wrote:
> The --entire-thread option in notmuch-show.c defaults to true when
> format=json. Previously there was no way to turn this off. This patch
> makes it respect --entire-thread=false.
>
> The one subtlety is that we initialise a notmuch_bool_t to -1 to
> indicate that the option parsing has not set it. This allows the code
> to distinguish between the option being omitted from the command line,
> and the option being set to false on the command line.
>
> Finally, all formats except Json can output empty messages for non
> entire-thread, but in Json format we need to output {} to keep the
> other elements (e.g. the replies to this message) in the correct
> place.
LGTM. You can probably remove the relevant item from devel/TODO as well!
-- Adam
More information about the notmuch
mailing list