git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: Guillaume PagèsNext: Guillaume Pages
Message 2 of 10 in “create a skeleton for the command git rebase --status”
  1. create a skeleton for the command git rebase --statusGuillaume Pagès, May 28, 2015
  2. Matthieu MoyMay 28, 2015
  3. Guillaume PagesMay 28, 2015
  4. Matthieu MoyMay 28, 2015
  5. Junio C HamanoMay 28, 2015
  6. Matthieu MoyMay 28, 2015
  7. Junio C HamanoMay 28, 2015
  8. Guillaume PagesMay 29, 2015
  9. Matthieu MoyMay 29, 2015
  10. Junio C HamanoMay 29, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.