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

Re: [PATCH/RFC] create a skeleton for the command git rebase --status

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 28, 2015, 12:36 UTC
Message-ID
<vpq382gri9d.fsf@anie.imag.fr>
In-Reply-To
<1432814891-4717-1-git-send-email-guillaume.pages@ensimag.grenoble-inp.fr>
Guillaume Pagès <guillaume.pages@ensimag.grenoble-inp.fr> writes:
> It is an almost empty code I send to validate the global architecture
> of this command.  I choose to write

Avoid personal wording (I choose to write ... because -> The code is written ... because). What matters in the commit message is the reason for the choice, not who made it.

> +BUILTIN_OBJS += builtin/rebase--status--helper.o
No builtin/rebase--status--helper.c in your patch, is it intended?
> +status)
> +	git rebase--status--helper
> +	die

"die" is used to exit with an error code ($? != 0). You just mean exit $? here, to exit with the same code as the helper.

And actually, you don't need to keep your script alive while the helper is ran, so you can write

exec git rebase--status--helper
Show 7 quoted lines
> --- /dev/null
> +++ b/rebase--status.c
> @@ -0,0 +1,6 @@
> +#include "rebase--status.h"
> +
> +int rebase_status(){
> +	printf("Rebase in progress\n");
... or not.

Avoid leaving incorrect things like this in intermediate steps, even if you're going to fix them eventually. It's too easy to forget the actual fix and leave a "Rebase in progress" message even when there's no rebase in progress. And reviewers may get confused.

I'd have written stg like
	printf("git rebase --status is not yet implemented");
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Guillaume PagèsNext: Matthieu Moy
Message 2 of 3 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. Matthieu MoyMay 28, 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.