Re: [RFC/PATCH v2] create a skeleton for the command git rebase --status
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- May 28, 2015, 15:39 UTC
- Message-ID
- <vpqpp5k1zjz.fsf@anie.imag.fr>
- In-Reply-To
- <1432822837-10320-1-git-send-email-guillaume.pages@ensimag.grenoble-inp.fr>
Guillaume Pagès <guillaume.pages@ensimag.grenoble-inp.fr> writes:
Show 6 quoted lines
> It is an almost empty code sent to validate the global architecture of > this command. It is written in C because git status is already in C > and it seems that it is the current tendency to port shell code to > C. Moreover will likely use code from wt_status to implement this > functionnality. The command calls a helper from a shell script, as it > is made in bisect (bisect--helper.c).
I think this paragraph makes sense in the commit message. My previous remark was about the wording, not about the relevance of the arguments.
Show 10 quoted lines
> +static const char * const git_rebase_status_helper_usage[] = {
> + N_("git rebase--status--helper"),
> + NULL
> +};
> +
> +int cmd_rebase_status__helper(int argc, const char **argv, const char *prefix)
> +{
> + struct option options[] = {
> +
> + };You need to tell parse_options when the array is over (that's C ...) => OPT_END().
> + argc = parse_options(argc, argv, prefix, options, > + git_rebase_status_helper_usage, 0);
Actually, you don't need option-parsing at all since you don't pass arguments to the helper, but why not have this in case we need it later.
No need to resend now, you'll send a new version when you have something to build on top (or if someone has more important remarks).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/