Re: [PATCH 1/4] Add a simple option parser for use by builtin-commit.c.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jonas Fonseca <fonseca@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, <gitster@...>, <git@...>
Date: Wednesday, October 3, 2007 - 5:53 pm

On Wed, 2007-10-03 at 22:11 +0200, Jonas Fonseca wrote:

I just sent an updated option parser patch that incorporates your
suggestions along with a patch that ports builtin-add.c to use it.  I
looked briefly into porting over a few other builtins, but you're right,
we need a couple of extra features for this to be really worthwile:

      * OPTION_SET_FLAG: sets the bit (we need to add a bit value that
        the option parser can or in)
      * OPTION_CLEAR_FLAG: clear the bit
      * OPTION_ADD: adds the value to the destination integer
      * OPTION_CALLBACK: calls the given function when the option is
        matched.  We'll need this for builtin-grep that has positional
        args such as --and etc.

Also, the option parser should probably verify that a string option
isn't passed more than once.  Bundling of single letter options would be
nice to add.  But the patch I just sent out should be a good start, and
it lets us move forward with builtin-commit.c.

cheers,
Kristian


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] Add a simple option parser for use by builtin-co..., Kristian Høgsberg, (Thu Sep 27, 12:50 am)
Re: [PATCH 1/4] Add a simple option parser for use by builti..., Johannes Schindelin, (Mon Oct 1, 2:13 pm)
Re: [PATCH 1/4] Add a simple option parser for use by builti..., Kristian , (Wed Oct 3, 5:53 pm)
Re: [PATCH 1/4] Add a simple option parser for use by builti..., Johannes Schindelin, (Mon Oct 1, 6:14 am)
Re: [PATCH 1/4] Add a simple option parser for use by builti..., Johannes Schindelin, (Mon Oct 1, 7:39 am)
[PATCH 2/4] This exports the update() function from builtin-..., Kristian Høgsberg, (Thu Sep 27, 12:50 am)
Re: [PATCH 2/4] This exports the update() function from buil..., Johannes Schindelin, (Thu Sep 27, 7:47 am)
[PATCH 3/4] Implement git commit as a builtin command., Kristian Høgsberg, (Thu Sep 27, 12:50 am)