unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Cc: jani@nikula.org, David Bremner <david@tethera.net>,
	Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: [PATCH v2 00/15] cli: argument parsing changes
Date: Sun,  1 Oct 2017 23:53:09 +0300	[thread overview]
Message-ID: <cover.1506890421.git.jani@nikula.org> (raw)

This series combines the designated initializers for argument parsing
from id:20170930213239.15392-1-jani@nikula.org and the argument parsing
refactoring from id:cover.1505853159.git.jani@nikula.org.

Additionally patch 1 handles some const confusion in notmuch-insert
before it becomes a problem in patch 2, and patches 5-7 add support for
the .present field to opt desc discussed in
id:87lgkvrhpa.fsf@nikula.org. Some more tests are sprinkled here and
there too.

BR,
Jani.


Jani Nikula (15):
  cli: strip trailing "/" from the final maildir path in notmuch insert
  cli: use designated initializers for opt desc
  test: add boolean argument to arg-test
  test: add opt_inherit to arg-test
  cli: add .present field to opt desc to check if the arg was present
  test: expand argument parsing tests
  cli: use the arg parser .present feature to handle show
    --entire-thread
  hex-xcode: use notmuch_bool_t for boolean arguments
  cli: use notmuch_bool_t for boolean argument in show
  cli: refactor boolean argument processing
  cli: change while to for in keyword argument processing
  cli: reduce indent in keyword argument processing
  cli: add support for --no- prefixed boolean and keyword flag arguments
  cli: use the negating boolean support for new and insert --no-hooks
  test: expand argument parsing sanity checks

 command-line-arguments.c      | 174 ++++++++++++++++++++++++++----------------
 command-line-arguments.h      |  41 ++++------
 notmuch-client.h              |   2 +-
 notmuch-compact.c             |   8 +-
 notmuch-count.c               |  16 ++--
 notmuch-dump.c                |  14 ++--
 notmuch-insert.c              |  48 ++++++------
 notmuch-new.c                 |  18 ++---
 notmuch-reindex.c             |   4 +-
 notmuch-reply.c               |  12 +--
 notmuch-restore.c             |  14 ++--
 notmuch-search.c              |  46 +++++------
 notmuch-show.c                |  41 +++++-----
 notmuch-tag.c                 |  12 +--
 notmuch.c                     |  22 +++---
 test/T410-argument-parsing.sh |  53 ++++++++++++-
 test/arg-test.c               |  56 +++++++++-----
 test/hex-xcode.c              |  12 +--
 test/random-corpus.c          |  20 ++---
 19 files changed, 350 insertions(+), 263 deletions(-)

-- 
2.11.0

             reply	other threads:[~2017-10-01 20:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01 20:53 Jani Nikula [this message]
2017-10-01 20:53 ` [PATCH v2 01/15] cli: strip trailing "/" from the final maildir path in notmuch insert Jani Nikula
2017-10-01 20:53 ` [PATCH v2 02/15] cli: use designated initializers for opt desc Jani Nikula
2017-10-01 20:53 ` [PATCH v2 03/15] test: add boolean argument to arg-test Jani Nikula
2017-10-01 20:53 ` [PATCH v2 04/15] test: add opt_inherit " Jani Nikula
2017-10-01 20:53 ` [PATCH v2 05/15] cli: add .present field to opt desc to check if the arg was present Jani Nikula
2017-10-01 20:53 ` [PATCH v2 06/15] test: expand argument parsing tests Jani Nikula
2017-10-01 20:53 ` [PATCH v2 07/15] cli: use the arg parser .present feature to handle show --entire-thread Jani Nikula
2017-10-01 20:53 ` [PATCH v2 08/15] hex-xcode: use notmuch_bool_t for boolean arguments Jani Nikula
2017-10-01 20:53 ` [PATCH v2 09/15] cli: use notmuch_bool_t for boolean argument in show Jani Nikula
2017-10-01 20:53 ` [PATCH v2 10/15] cli: refactor boolean argument processing Jani Nikula
2017-10-01 20:53 ` [PATCH v2 11/15] cli: change while to for in keyword " Jani Nikula
2017-10-01 20:53 ` [PATCH v2 12/15] cli: reduce indent " Jani Nikula
2017-10-02  0:33   ` David Bremner
2017-10-05 10:43     ` David Bremner
2017-10-01 20:53 ` [PATCH v2 13/15] cli: add support for --no- prefixed boolean and keyword flag arguments Jani Nikula
2017-10-01 21:08   ` William Casarin
2017-10-02 15:52     ` Jani Nikula
2017-10-01 20:53 ` [PATCH v2 14/15] cli: use the negating boolean support for new and insert --no-hooks Jani Nikula
2017-10-01 20:53 ` [PATCH v2 15/15] test: expand argument parsing sanity checks Jani Nikula
2017-10-02 16:25 ` [PATCH] cli: allow empty strings for notmuch insert --folder argument Jani Nikula

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=cover.1506890421.git.jani@nikula.org \
    --to=jani@nikula.org \
    --cc=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --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).