threads / patch / 21525

patch[next] log --format: don't ignore %w() at the start of format string

Subject: [PATCH][next] log --format: don't ignore %w() at the start of format string

## tl;dr

One message between Nov 8, 2009 and Nov 8, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

René Scharfe· Nov 8, 2009, 01:04 UTC · lore
This fixes e.g. --format='%w(72)%s'.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 pretty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to pretty.c +1 −1
diff --git a/pretty.c b/pretty.c
index 5c3b47b..2e031e6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -619,7 +619,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;

← back to recent threads