git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [parse-options] proposal for merge, take 1
@ 2007-10-16  8:16 Pierre Habouzit
  2007-10-16  8:20 ` Pierre Habouzit
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Pierre Habouzit @ 2007-10-16  8:16 UTC (permalink / raw)
  To: git, Shawn O. Pearce

  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(-)

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-10-17 19:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16  8:16 [parse-options] proposal for merge, take 1 Pierre Habouzit
2007-10-16  8:20 ` 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

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 NNTP newsgroup(s).