From: Johannes Schindelin Date: Fri, 29 Sep 2006 04:07:26 GMT Subject: Re: [PATCH] --stat: ensure at least one '-' for deletions, and one '+' for additions Message-ID: In-Reply-To: <7vd59fquc5.fsf@assigned-by-dhcp.cox.net> Hi, On Thu, 28 Sep 2006, Junio C Hamano wrote: > Another way is what I suggested earlier -- if the width is odd, drop one > to avoid this problem altogether. That would also be acceptable and > probably be more consistent. I see that you care deeply about the 7 column example. In that case, yes, I would rather have columns be rounded down to the next even number. I care more about the consistency: if there are changes, I want to see them, and it should be linear: the more changes, the more plusses or minusses. Ciao, Dscho P.S.: here's a patch on top of my last one: -- snip -- [PATCH] force even diffstat width Signed-off-by: Johannes Schindelin --- diff.c | 3 ++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/diff.c b/diff.c index 53c30bd..2a898e6 100644 --- a/diff.c +++ b/diff.c @@ -729,6 +729,9 @@ static void show_stats(struct diffstat_t else width = max_change; + /* force width to be even */ + width &= ~1; + for (i = 0; i < data->nr; i++) { const char *prefix = ""; char *name = data->files[i]->name; -- 1.4.2.1.g1a99e1-dirty