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