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

Re: [PATCH] Don't use "<unknown>" for unknown values of placeholders and suppress printing of empty user formats.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 25, 2007, 14:47 UTC
Message-ID
<Pine.LNX.4.64.0709251543561.28395@racer.site>
In-Reply-To
<20070925143846.GQ22869@mageo.cz>
Hi,
On Tue, 25 Sep 2007, Michal Vitecek wrote:
> ---
> 
>  Sending the patch again in correct form (hopefully) as instructed by
>  Johannes Schindelin. Sorry for the hassle.
Thanks.
Show 11 quoted lines
> diff --git a/commit.c b/commit.c
> index 99f65ce..c9a1818 100644
> --- a/commit.c
> +++ b/commit.c
> @@ -917,9 +917,6 @@ long format_commit_message(const struct commit *commit, const void *format,
>  	}
>  	if (msg[i])
>  		table[IBODY].value = xstrdup(msg + i);
> -	for (i = 0; i < ARRAY_SIZE(table); i++)
> -		if (!table[i].value)
> -			interp_set_entry(table, i, "<unknown>");
This may have warranted a description in the commit message a la
	Instead of setting unknown entries to "<unknown>" in the 
	interp_table, we teach interpolate() to replace entries with 
	NULL values by the empty string.
Show 11 quoted lines
> diff --git a/log-tree.c b/log-tree.c
> index a642371..79502f4 100644
> --- a/log-tree.c
> +++ b/log-tree.c
> @@ -175,14 +175,15 @@ void show_log(struct rev_info *opt, const char *sep)
>  	 *  - The pretty-printed commit lacks a newline at the end
>  	 *    of the buffer, but we do want to make sure that we
>  	 *    have a newline there. If the separator isn't already
> -	 *    a newline, add an extra one.
> +         *    a newline, add an extra one and do the same for the
> +         *    user format as well.
Here are still spaces instead of tabs.

These are only minor details; I don't know if Junio wants to fix them himself.

Ciao, Dscho

Previous: Michal VitecekNext: Junio C Hamano
Message 2 of 3 in “Don't use "<unknown>" for unknown values of placeholders and suppress printing of empty user formats.”
  1. Don't use "<unknown>" for unknown values of placeholders and suppress printing of empty user formats.Michal Vitecek, Sep 25, 2007
  2. Johannes SchindelinSep 25, 2007
  3. Junio C HamanoSep 26, 2007

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.