Code

log --format: don't ignore %w() at the start of format string
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sun, 8 Nov 2009 01:04:21 +0000 (02:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Nov 2009 00:51:33 +0000 (16:51 -0800)
This fixes e.g. --format='%w(72)%s'.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c

index 91be0ce0a059c39c6949fff7f9e50d89d9330685..5e9d1f84b976c7f85e67c6af446d31e54c2388fd 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -618,7 +618,7 @@ static void rewrap_message_tail(struct strbuf *sb,
        if (c->width == new_width && c->indent1 == new_indent1 &&
            c->indent2 == new_indent2)
                return;
-       if (c->wrap_start && c->wrap_start < sb->len)
+       if (c->wrap_start < sb->len)
                strbuf_wrap(sb, c->wrap_start, c->width, c->indent1, c->indent2);
        c->wrap_start = sb->len;
        c->width = new_width;