author | Junio C Hamano <gitster@pobox.com> | |
Mon, 16 Nov 2009 00:41:17 +0000 (16:41 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 16 Nov 2009 00:41:17 +0000 (16:41 -0800) |
* 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
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
1 | 2 | |||
---|---|---|---|---|
pretty.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc pretty.c
index da15cf2a80d08e38b4b0bb279e378b72dbe49cc7,5e9d1f84b976c7f85e67c6af446d31e54c2388fd..2e031e62fd98c02bfa6cc558fc49aef86c03ed09
+++ b/pretty.c
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;
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,