Re: [PATCH 5/6] sequencer: Expose API to cherry-picking machinery
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 11, 2011, 21:56 UTC
- Message-ID
- <20110811215650.GA13839@elie.gateway.2wire.net>
- In-Reply-To
- <1313088705-32222-6-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
> +++ b/sequencer.c > @@ -1,8 +1,809 @@
[...]
Show 5 quoted lines
> +static const char * const revert_usage[] = {
> + "git revert [options] <commit-ish>",
> + "git revert <subcommand>",
> + NULL
> +};[...]
> +++ b/sequencer.h
[...]
Show 5 quoted lines
> @@ -25,4 +50,7 @@ struct replay_insn_list {
> */
> void remove_sequencer_state(int aggressive);
>
> +void sequencer_parse_args(int argc, const char **argv, struct replay_opts *opts);Another thought. I wonder if it's possible to leave sequencer_parse_args() private to builtin/revert.c, making the split a little more logical:
- the builtin takes responsibility for its commandline interface - the library takes over once the builtin has figured out what the user wanted.
(If another command wants to reuse some subset of cherry-pick/revert's commandline options, an appropriate function can always be exposed later.)