All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: [parse-options] proposal for merge, take 1
Date: Tue, 16 Oct 2007 10:16:31 +0200	[thread overview]
Message-ID: <1192522616-16274-1-git-send-email-madcoder@debian.org> (raw)

  Hi, thanks to the tremendous help I received from Dscho to make its
API and internals even better, I believe that my parseopt branch is
ready for inclusion.

  There is only _one_ small backward incompatibility (if other ones,
then it's not done on purpose and should be fixed) in git-show-ref: it
had a -h short option, synonym of --head. I made this -H because -h is
automatically diverted to "show usage" now, and it's counter-intuitive
anyways. I rebased -i my series so that this patch comes last if people
think it's a bad idea, so that the rest can be still be merged.

  Note that patch 7/25 has a small discussion in it.

  The series comes in 2 parts: the parse-options construction, split
into small pieces to introduce each feature. And the migration of a few
builtins. Diffstats and shortlogs follow.

  The branch is available from git://git.madism.org/git.git in the topic
branch ph/parseopt. I just rebased it onto the last "next" spearce
produced.

  Thanks to Alex Riesen, Johannes Schindelin, Jonas Fonseca and Kristian
Høgsberg for their help, patches and advices.

==============================================================================
Part 1
------------------------------------------------------------------------------

  Alex Riesen (1):
      Rework make_usage to print the usage message immediately

  Johannes Schindelin (2):
      Add tests for parse-options.c
      parse-options: Allow abbreviated options when unambiguous

  Pierre Habouzit (5):
      Add a simple option parser.
      parse-options: be able to generate usages automatically
      Add shortcuts for very often used options.
      parse-options: make some arguments optional, add callbacks.
      parse-options: allow callbacks to take no arguments at all.

  .gitignore               |    1 +
  Makefile                 |    6 +-
  parse-options.c          |  328 ++++++++++++++++++++++++++++++++++++++++++++++
  parse-options.h          |   70 ++++++++++
  t/t0040-parse-options.sh |   92 +++++++++++++
  test-parse-options.c     |   35 +++++
  6 files changed, 529 insertions(+), 3 deletions(-)


==============================================================================
Part 2
------------------------------------------------------------------------------

  Jonas Fonseca (1):
      Update manpages to reflect new short and long option aliases

  Kristian Høgsberg (1):
      Port builtin-add.c to use the new option parser.

  Pierre Habouzit (16):
      Make builtin-rm.c use parse_options.
      Make builtin-mv.c use parse-options
      Make builtin-branch.c use parse_options.
      Make builtin-describe.c use parse_options
      Make builtin-fetch.c use parse_options.
      Make builtin-revert.c use parse_options.
      Make builtin-update-ref.c use parse_options
      Make builtin-symbolic-ref.c use parse_options.
      Make builtin-http-fetch.c use parse_options.
      Make builtin-for-each-ref.c use parse-opts.
      Make builtin-fsck.c use parse_options.
      Make builtin-count-objects.c use parse_options.
      Make builtin-name-rev.c use parse_options.
      Make builtin-pack-refs.c use parse_options.
      Make builtin-show-ref.c use parse_options [small backward incompatibility].
      Make builtin-pack-objects.c use parse_options.

  Documentation/git-add.txt          |    4 +-
  Documentation/git-branch.txt       |    2 +-
  Documentation/git-mv.txt           |    2 +-
  Documentation/git-rm.txt           |    4 +-
  Documentation/git-show-ref.txt     |    4 +-
  Documentation/git-symbolic-ref.txt |    2 +-
  builtin-add.c                      |   70 +++------
  builtin-branch.c                   |  147 +++++++------------
  builtin-count-objects.c            |   32 ++--
  builtin-describe.c                 |   70 ++++-----
  builtin-fetch.c                    |  146 ++++++------------
  builtin-for-each-ref.c             |  138 ++++++++----------
  builtin-fsck.c                     |   80 +++-------
  builtin-http-fetch.c               |   65 ++++-----
  builtin-mv.c                       |   84 +++++------
  builtin-name-rev.c                 |   64 +++-----
  builtin-pack-objects.c             |  294 +++++++++++++++++-------------------
  builtin-pack-refs.c                |   47 +++----
  builtin-revert.c                   |   67 ++++-----
  builtin-rm.c                       |   54 +++----
  builtin-show-ref.c                 |  127 ++++++----------
  builtin-symbolic-ref.c             |   52 +++----
  builtin-update-ref.c               |   65 +++-----
  23 files changed, 654 insertions(+), 966 deletions(-)

             reply	other threads:[~2007-10-16  8:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16  8:16 Pierre Habouzit [this message]
2007-10-16  8:20 ` [parse-options] proposal for merge, take 1 Pierre Habouzit
2007-10-16  8:43   ` Pierre Habouzit
     [not found] ` <1192523998-19474-1-git-send-email-madcoder@debian.org>
     [not found]   ` <1192523998-19474-2-git-send-email-madcoder@debian.org>
     [not found]     ` <1192523998-19474-3-git-send-email-madcoder@debian.org>
     [not found]       ` <1192523998-19474-4-git-send-email-madcoder@debian.org>
     [not found]         ` <1192523998-19474-5-git-send-email-madcoder@debian.org>
     [not found]           ` <1192523998-19474-6-git-send-email-madcoder@debian.org>
     [not found]             ` <1192523998-19474-7-git-send-email-madcoder@debian.org>
2007-10-16  8:45               ` [PATCH 07/25] parse-options: make some arguments optional, add callbacks Pierre Habouzit
2007-10-16 13:18                 ` Johannes Schindelin
2007-10-16 16:38                 ` René Scharfe
2007-10-16 16:44                   ` Johannes Schindelin
2007-10-16 16:53                     ` Pierre Habouzit
2007-10-16 17:21                       ` Nicolas Pitre
2007-10-16 17:04                     ` René Scharfe
2007-10-16 16:44                   ` Nicolas Pitre
2007-10-16 16:50                   ` Pierre Habouzit
2007-10-17  4:44                     ` Shawn O. Pearce
2007-10-17 18:00                       ` Johannes Schindelin
     [not found]               ` <1192523998-19474-8-git-send-email-madcoder@debian.org>
     [not found]                 ` <1192523998-19474-9-git-send-email-madcoder@debian.org>
2007-10-16  8:55                   ` [PATCH 09/25] Port builtin-add.c to use the new option parser Michael Witten
2007-10-16  9:36                     ` Michael Witten
2007-10-16 13:17                     ` Johannes Schindelin
2007-10-16 15:36                       ` Michael Witten
2007-10-16 16:55                     ` Pierre Habouzit
2007-10-16 17:56         ` [PATCH 04/25] Rework make_usage to print the usage message immediately Alex Riesen
2007-10-16 22:15           ` Pierre Habouzit
2007-10-17 19:06             ` Alex Riesen
     [not found] ` <1192523721-18985-1-git-send-email-madcoder@debian.org>
2007-10-17  7:24   ` [PATCH 01/25] Add a simple option parser Shawn O. Pearce
2007-10-17  7:52     ` Pierre Habouzit

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1192522616-16274-1-git-send-email-madcoder@debian.org \
    --to=madcoder@debian.org \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.