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

Re: [PATCH] Replace "git-" with "git " in *.[ch] comments and notifications

From
Christian Couder <chriscool@tuxfamily.org>
Date
Aug 30, 2008, 11:29 UTC
Message-ID
<200808301329.46226.chriscool@tuxfamily.org>
In-Reply-To
<7vr6872qv1.fsf@gitster.siamese.dyndns.org>
Le samedi 30 août 2008, Junio C Hamano a écrit :
Show 26 quoted lines
> One thing you might be able to do would be to separate user visible
> strings and in-comment strings.  Frankly, when a comment talks about a
> git subprogram, blindly replacing s/-/ / makes it _far worse_ and the
> resulting text is harder to read for git hackers (who are primary
> audiences of comments).  E.g. taking one random example from your patch:
>
> diff --git a/builtin-init-db.c b/builtin-init-db.c
> index baf0d09..81aa822 100644
> --- a/builtin-init-db.c
> +++ b/builtin-init-db.c
> @@ -37,7 +37,7 @@ static void copy_templates_1(char *path, int baselen,
>
>  	/* Note: if ".git/hooks" file exists in the repository being
>  	 * re-initialized, /etc/core-git/templates/hooks/update would
> -	 * cause git-init to fail here.  I think this is sane but
> +	 * cause git init to fail here.  I think this is sane but
>  	 * it means that the set of templates we ship by default, along
>  	 * with the way the namespace under .git/ is organized, should
>  	 * be really carefully chosen.
>
> I do not think this is an improvement.  We are talking about a single
> subprogram, not what the user types from the command line.  Either of
> these two would be easier to read:
>
> 	... would cause git-init to fail here...
>         ... would cause "init" to fail here...
I think "git init" is even better, as "init" could be ambiguous.
Show 8 quoted lines
> than:
>
>         ... would cause git init to fail here...
>
> Among these three, I think the second one is the most readable.  Perhaps
> dropping "git-" prefix when we are talking about a git subprogram, and
> quoting the word to make it stand out, could be a good approach , than
> replacing it with "git " prefix.

Regards, Christian.

Previous: Andreas Ericsson
Message 7 of 7 in “Replace "git-" with "git " in *.[ch] comments and notifications”
  1. Replace "git-" with "git " in *.[ch] comments and notificationsHeikki Orsila, Aug 29, 2008
  2. Junio C HamanoAug 30, 2008
  3. Heikki OrsilaAug 30, 2008
  4. Junio C HamanoAug 30, 2008
  5. Heikki OrsilaAug 30, 2008
  6. Andreas EricssonAug 30, 2008
  7. Christian CouderAug 30, 2008

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.