From: Junio C Hamano Date: Mon, 16 Nov 2009 00:41:17 +0000 (-0800) Subject: Merge branch 'rs/pretty-wrap' X-Git-Tag: v1.6.6-rc0~47 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=934c042c9cf09a14762b3fa094f1ba15ec721161;p=git.git Merge branch 'rs/pretty-wrap' * rs/pretty-wrap: log --format: don't ignore %w() at the start of format string Implement wrap format %w() as if it is a mode switch Conflicts: pretty.c --- 934c042c9cf09a14762b3fa094f1ba15ec721161 diff --cc pretty.c index da15cf2a8,5e9d1f84b..2e031e62f --- a/pretty.c +++ b/pretty.c @@@ -443,9 -442,10 +443,10 @@@ struct chunk struct format_commit_context { const struct commit *commit; - enum date_mode dmode; + const struct pretty_print_context *pretty_ctx; unsigned commit_header_parsed:1; unsigned commit_message_parsed:1; + size_t width, indent1, indent2; /* These offsets are relative to the start of the commit message. */ struct chunk author; @@@ -764,8 -802,10 +819,10 @@@ void format_commit_message(const struc memset(&context, 0, sizeof(context)); context.commit = commit; - context.dmode = dmode; + context.pretty_ctx = pretty_ctx; + context.wrap_start = sb->len; strbuf_expand(sb, format, format_commit_item, &context); + rewrap_message_tail(sb, &context, 0, 0, 0); } static void pp_header(enum cmit_fmt fmt,